Template:Lang
For tagging inline usage of foreign words. Typically inside the meaning column of the Localisation Table. This is important for accessibility, as well as correct font rendering in certain languages.
Usage
Provide a language code followed by text in that language.
{{lang|language|foreign word or phrase}}
DOES NOT need to be used in the Name column of the Localisation table, as the the appropriate values are already set in that column. However, it SHOULD be used for foreign words in the Meaning/Explanation column.
language codes for the official localisations:
pt-BRfor Brazilian Portuguese
frfor French
defor German
itfor Italian
jafor Japanese
kofor Korean
rufor Russian
zh-Hansfor Chinese Simplified
zh-Hantfor Chinese Traditional
esfor Spanish
Example
The following code:
{{lang|ja|深層の港 <i>Shinsō no minato</i>}} (Deep Docks)
{{lang|zh-Hans|深坞 <i>Shēn wù</i>}} (Deep Docks)
{{lang|es|<i>Muelles Profundos</i>}} (Deep Docks)
Gives:
深層の港 Shinsō no minato (Deep Docks)
深坞 Shēn wù (Deep Docks)
Muelles Profundos (Deep Docks)
Note the first character is rendered differently in Chinese and Japanese, despite sharing a unicode codepoint.
No description.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| language code | 1 | BCP 47 language tag
| String | required |
| text | 2 | text in a foreign language | String | required |