Template:Language icon

From OpenStreetMap Wiki
Jump to navigation Jump to search

({{{2}}})

[Edit] [Purge] Template-info.svg Template documentation
Usage
  • {{Language icon|unused|language code}}
  • {{Language icon|unused|language code|text=text}}
  • {{Language icon|unused|language code|dir=rtl|text=text}}
Parameters
  • 1=unused (optional) – was the name of the language in English (« French », « German », etc.) or translated in the language of the current page
    Note: This legacy parameter 1 is no longer used but remains only for documentation purpose and to avoid breaking usage of parameter 2.
  • 2=language code (required) – the BCP 47 code of the language. The letter case of the specified code is not significant and will be displayed in lowercase.
    Note: This is usually a 2-letter code (e.g. fr, de, etc.) from ISO 639-1 (or a 2-letter code from 639-2, or a 3-letter code from 639-3 otherwise), possibly followed after an hyphen by a 4-letter script code from ISO 15924 (e.g. zh-hans).
  • text=text (optional) : a text to mark as in a specific language
  • dir=rtl (optional) : only useful if a text is given and must be read from right to left (normally determined automatically using {{Dir}} from the specified language code)
See also
  • {{Langcode}}, used to detect the language of the current page in order to translate the indicated language name.
  • {{Languagename}}, translates a language code into a language name for a given language code in order to display it when hovering the icon showing only the given code.
  • {{Dir}}, determines the correct writing direction for the optional text to render after the language icon.