Template:Lang

From Hollow Knight Wiki
Jump to navigation Jump to search
[view] [edit] [history] [refresh]Documentation

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 Language Flag pt-BR for Brazilian Portuguese
  • FR Language Flag fr for French
  • DE Language Flag de for German
  • IT Language Flag it for Italian
  • JA Language Flag ja for Japanese
  • KO Language Flag ko for Korean
  • RU Language Flag ru for Russian
  • ZH Language Flag zh-Hans for Chinese Simplified
  • TW Language Flag zh-Hant for Chinese Traditional
  • ES Language Flag es for 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.

[view] [edit] [history] [refresh]The above documentation is transcluded from Template:Lang/doc.

No description.

Template parameters[Edit template data]

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
language code1

BCP 47 language tag

Suggested values
pt-BR fr de it ja ko ru zh-Hans es zh-Hant
Stringrequired
text2

text in a foreign language

Stringrequired