Difference between revisions of "Template:Lang"
m (Translate info) |
|||
Line 1: | Line 1: | ||
<span lang="{{lc:{{{1}}}}}" xml:lang="{{lc:{{{1}}}}}">{{#switch:{{lc:{{{1|}}}}} | <span lang="{{lc:{{{1}}}}}" xml:lang="{{lc:{{{1}}}}}">{{#switch:{{lc:{{{1|}}}}} | ||
|zh|gan|zh-yue = {{{2}}} | |zh|gan|zh-yue = {{{2}}} | ||
− | |jp|jap = -{{{{2}}}}-<span class="error" style="font-size:smaller;"> | + | |jp|jap = -{{{{2}}}}-<span class="error" style="font-size:smaller;">Incorrect template argument: Use '''ja''' for Japanese</span> |
− | |gr = -{{{{2}}}}-<span class="error" style="font-size:smaller;"> | + | |gr = -{{{{2}}}}-<span class="error" style="font-size:smaller;">Incorrect template argument: Use '''el''' or '''gre''' for Greek</span> |
− | |kr = -{{{{2}}}}-<span class="error" style="font-size:smaller;"> | + | |kr = -{{{{2}}}}-<span class="error" style="font-size:smaller;">Incorrect template argument: Use '''ko''' or '''kor''' for Korean. kr is the code for Kanuri; if there are pages including this language, please report at[[Template talk:Lang]] to remove this warning.</span> |
− | |kp = -{{{{2}}}}-<span class="error" style="font-size:smaller;"> | + | |kp = -{{{{2}}}}-<span class="error" style="font-size:smaller;">Incorrect template argument: Use '''ko''' or '''kor''' for Korean</span> |
− | |po = -{{{{2}}}}-<span class="error" style="font-size:smaller;"> | + | |po = -{{{{2}}}}-<span class="error" style="font-size:smaller;">Incorrect template argument: Use '''pl''' or '''pol''' for Polish</span> |
− | |sp = -{{{{2}}}}-<span class="error" style="font-size:smaller;"> | + | |sp = -{{{{2}}}}-<span class="error" style="font-size:smaller;">Incorrect template argument: Use '''es''' or '''spa''' for Spanish</span> |
− | |cz = -{{{{2}}}}-<span class="error" style="font-size:smaller;"> | + | |cz = -{{{{2}}}}-<span class="error" style="font-size:smaller;">Incorrect template argument: Use '''cs''' or '''cze''' for Czech</span> |
− | |kz = -{{{{2}}}}-<span class="error" style="font-size:smaller;"> | + | |kz = -{{{{2}}}}-<span class="error" style="font-size:smaller;">Incorrect template argument: Use '''kk''' or '''kaz''' for Kazakh</span> |
− | |dk = -{{{{2}}}}-<span class="error" style="font-size:smaller;"> | + | |dk = -{{{{2}}}}-<span class="error" style="font-size:smaller;">Incorrect template argument: Use '''da''' for Danish</span> |
− | |unicode|ipa = -{{{{2}}}}-<span class="error" style="font-size:smaller;"> | + | |unicode|ipa = -{{{{2}}}}-<span class="error" style="font-size:smaller;">Incorrect template argument: Please check and use the correct lang code</span> |
|#default = {{{2}}}}}</span>{{#switch:{{{1|}}} | |#default = {{{2}}}}}</span>{{#switch:{{{1|}}} | ||
|ar|fa|he|ps|ur = ‎ | |ar|fa|he|ps|ur = ‎ | ||
|#default = }}{{#if:{{NAMESPACE}}| | |#default = }}{{#if:{{NAMESPACE}}| | ||
− | <!-- |[[Category: | + | <!-- |[[Category:Pages containing {{#switch:{{lc:{{{1|}}}}} |
− | |ar = | + | |ar = Arabic |
|en|eng = English | |en|eng = English | ||
− | |es = | + | |es = Spanish |
|de = German | |de = German | ||
|fr = French | |fr = French | ||
|ja|jp|jap= Japanese | |ja|jp|jap= Japanese | ||
− | |bg = | + | |bg = Bulgarian |
− | |cs = | + | |cs = Czech |
− | |da = | + | |da = Danish |
− | |nl = | + | |nl = Dutch |
− | |et = | + | |et = Estonian |
− | |fi = | + | |fi = Finnish |
− | |el|gre = | + | |el|gre = Greek |
− | |hu = | + | |hu = Hungarian |
− | |ga = | + | |ga = Irish |
− | |grc = | + | |grc = Ancient Greek |
|la|lat = Latin | |la|lat = Latin | ||
− | |cy = | + | |cy = Welsh |
− | |sl|slv = | + | |sl|slv = Slovene |
− | |zh-yue|yue|zh-hk = | + | |zh-yue|yue|zh-hk = Cantonese |
|zh|zh-hans|zh-hant|zh-cn|zh-tw|zh-sg = Chinese | |zh|zh-hans|zh-hant|zh-cn|zh-tw|zh-sg = Chinese | ||
− | |#default = {{#ifexist:Category: | + | |#default = {{#ifexist:Category:Pages containing{{ISO 639 name {{lc:{{{1|}}}}}}} |
|{{ISO 639 name {{lc:{{{1|}}}}}}} | |{{ISO 639 name {{lc:{{{1|}}}}}}} | ||
− | | | + | |non-English |
}} | }} | ||
− | }} | + | }}]] --> |
}}<noinclude>{{documentation}}</noinclude> | }}<noinclude>{{documentation}}</noinclude> |
Revision as of 21:49, 28 August 2019
{{{2}}}
The purpose of this template is to indicate that a span of text belongs to a particular language.
Usage
{{lang|language tag|text}}
The language tag should consist of an ISO 639 language code.
The ISO 639 language code is a two- or three-letter abbreviation, in lowercase, of the language's name. Japanese, for example, has the code ja
:
{{lang|ja|蓬莱山輝夜}}
→ 蓬莱山輝夜
Meaning of the template
The same word or character has different fonts in different countries and regions. Expecially in Chinese character culture circle of East Asia for the following example.
- If you see that the glyphs of the same line of words in the following example are exactly the same, your browser version might be too old.
Or the default font compatibility of the website is poor.
General meaning of the character | Chinese Simplify (Mainland China) | Chinese Traditional (Taiwan) | Japanese | Korean |
---|---|---|---|---|
bone | 骨 | 骨 | 骨 | 骨 |
send | 送 | 送 | 送 | 送 |
shine | 耀 | 耀 | 耀 | 耀 |
Common language code list
- ATTENTION: Standard ISO 639-3 is incompatible with some fonts, please use it with caution.
Names of languages and their variants | Language code | |
---|---|---|
ISO 639-1 | ISO 639-3 | |
Chinese | zh |
zho
|
Simplified Chinese | zh-Hans |
zho-Hans
|
Traditional Chinese | zh-Hant |
zho-Hant
|
Chinese (Mainland China) | zh-CN |
zho-CN
|
Chinese (Taiwan) | zh-TW |
zho-TW
|
Chinese (Hong Kong) | zh-HK |
zho-HK
|
English | en |
eng
|
Chuang (Zhuang) | za |
zha
|
Tibetan | bo |
bod
|
Mongolian | mn |
mon
|
Uyghur | ug |
uig
|
Yue Chinese (Cantonese) | - | yue
|
Korean | ko |
kor
|
Japanese | ja |
jpn
|
Thai | th |
tha
|
Arabic | ar |
ara
|
Hindi | hi |
hin
|
Names of languages and their variants | Language code | |
---|---|---|
ISO 639-1 | ISO 639-3 | |
Indonesian | id |
ind
|
Russian | ru |
rus
|
Spanish | es |
spa
|
Portuguese | pt |
por
|
French | fr |
fra
|
German | de |
deu
|
Italian | it |
ita
|
Polish | pl |
pol
|
Ukrainian | uk |
ukr
|
Turkish | tr |
tur
|
Serbian | sr |
srp
|
Danish | da |
dan
|
Sanskrit | sa |
san
|
Siddhaṃ script | sa-Sidd |
san-Sidd
|
Greek | el |
ell
|
Ancient Greek (to 1453) | - | grc
|
Latin | la |
lat
|
- For more language code, you can go to Wikipedia or SIL International to search for.