Template:Native name/doc: Difference between revisions

From Zoophilia Wiki
Jump to navigationJump to search
meta>Thayts
No edit summary
meta>Wdchk
→‎Usage: moved pipe characters inside square brackets; they belong with the optional parameters
Line 4: Line 4:


==Usage==
==Usage==
{{Pre|{{((}}native name{{!}}''language tag''{{!}}''text''{{!}}[icon{{=}}''no'']{{!}}[italic{{=}}''no'']{{))}}}}
{{Pre|{{((}}native name{{!}}''language tag''{{!}}''text''[{{!}}icon{{=}}''no''][{{!}}italic{{=}}''no'']{{))}}}}
:('<tt>[...]</tt>' means 'optional', do not include the square brackets when using this template)
:('<tt>[...]</tt>' means 'optional', do not include the square brackets when using this template)
where
where

Revision as of 22:18, 19 August 2011

Convenience template to indicate what language a native name of a place (like that of a country or town) belongs to, appending the language name in an icon. Uses {{lang}} and {{language icon}}. It makes the native name appear in italics by default, although this can be overridden, as can the language icon be excluded. Therefore, the template may make no visible changes to the text, but it does add a span tag with language attributes around the native name to the page's source code, which can help web browsers choose the right font, screen readers use the right pronunciation and more.

Usage

{{native name|language tag|text[|icon=no][|italic=no]}}
('[...]' means 'optional', do not include the square brackets when using this template)

where

  • language tag is the code for the native language (see the list of ISO 639 codes);
  • text is the native name;
  • icon is an optional parameter to exclude the language icon by setting the value to "no";
  • italic is an optional parameter to prevent the name from appearing in italics by setting the value to "no".

Examples

{{Infobox settlement
 |name=The Hague
 |native_name={{native name|nl|Den Haag}}
}}

results in

The Hague
Den Haag  (Dutch)

while

{{Infobox settlement
 |name=French Republic
 |native_name={{native name|fr|République française|icon=no}}
}}

results in

French Republic
République française

 

Note

When setting both the icon and italic parameters to "no" this template is equivalent to the {{lang}} template.