Template:Lang

From Wikivoyage
Jump to navigation Jump to search
[view] [edit] [history] [purge] Template-info.svg Template documentation

This template is for making sure that text in a foreign language and/or script is displayed properly. For example, 日本語 is Japanese for "Japanese language", and is displayed without this template. Compare it to 日本語, which is displayed with the template. It ensures the correct fonts are used to display the language. See the documentation at the Lang template on English Wikipedia for more information.

Compare the following words, where the word on the left is without this template, but the word on the right is using the template:

  • العَرَبِيَّة to العَرَبِيَّة (Arabic)
  • اُردُو to اُردُو (Urdu)
  • 普通话 to 普通话 (Chinese)

Usage[edit]

To use this template, enter the code {{lang|<ISO code>|<text>}}, replacing <ISO code> with the ISO code of the language, which is usually displayed in that language's infobox on its Wikipedia page, for example, "fr" for French, or "de" for German. Then replace <text> with the foreign text. For example, {{lang|ja|日本語}} displays 日本語.

Template for making sure that text in a foreign language and/or script is displayed properly. See the documentation at the Lang template on English Wikipedia ([[:w:Template:Lang]]) for more information

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
ISO code1

ISO code of the language, usually displayed in that language's infobox on its Wikipedia page

Example
zh
Stringrequired
Text2

Text in the foreign language

Example
中文
Stringrequired