m Added to Category:Language templates  | 
				 Additions  | 
				||
| Line 10: | Line 10: | ||
* <code><nowiki>{{</nowiki>lang|ja|蓬莱山輝夜}}</code> → {{lang|ja|蓬莱山輝夜}}  | * <code><nowiki>{{</nowiki>lang|ja|蓬莱山輝夜}}</code> → {{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.  | |||
{  | {| class="wikitable" style="text-align:center"  | ||
!width="20%"| General meaning of the character  | |||
!width="20%"| Chinese Simplify (Mainland China)  | |||
!width="20%"| Chinese Traditional (Taiwan)  | |||
!width="20%"| Japanese  | |||
!width="20%"| Korean  | |||
|-style="font-size:1.5em"  | |||
| [https://hanziyuan.net/#骨 bone] ||{{Lang|zh-CN|骨}} || {{Lang|zh-TW|骨}} || {{Lang|ja|骨}} || {{Lang|ko|骨}}  | |||
|-style="font-size:1.5em"  | |||
| [https://hanziyuan.net/#送 send] ||{{Lang|zh-CN|送}} || {{Lang|zh-TW|送}} || {{Lang|ja|送}} || {{Lang|ko|送}}  | |||
|-style="font-size:1.5em"  | |||
| [https://hanziyuan.net/#耀 shine] ||{{Lang|zh-CN|耀}} || {{Lang|zh-TW|耀}} || {{Lang|ja|耀}} || {{Lang|ko|耀}}  | |||
|}  | |||
==Common language code list==  | |||
<div style="display:flex;">  | |||
{| class="wikitable" style="text-align: center;"  | |||
!width="50%" rowspan="2"| Names of languages and their variants  | |||
}  | !width="50%" colspan="2"| Language code  | ||
</  | |-  | ||
! ISO 639-1 !! ISO 639-3  | |||
|-  | |||
| [[wikipedia:Chinese language|Chinese]] || <code>zh</code> || <code>zho</code>  | |||
|-  | |||
| [[wikipedia:Simplified Chinese characters|Simplified Chinese]] || <code>zh-Hans</code> || <code>zho-Hans</code>  | |||
|-  | |||
| [[wikipedia:Traditional Chinese characters|Traditional Chinese]] || <code>zh-Hant</code> || <code>zho-Hant</code>  | |||
|-  | |||
| [[wikipedia:Simplified Chinese characters|Chinese (Mainland China)]] || <code>zh-CN</code> || <code>zho-CN</code>  | |||
|-  | |||
| [[wikipedia:Traditional Chinese characters|Chinese (Taiwan)]] || <code>zh-TW</code> || <code>zho-TW</code>  | |||
|-  | |||
| [[wikipedia:Traditional Chinese characters|Chinese (Hong Kong)]] || <code>zh-HK</code> || <code>zho-HK</code>  | |||
|-  | |||
| [[wikipedia:English language|English]] || <code>en</code> || <code>eng</code>  | |||
|-  | |||
| [[wikipedia:Zhuang languages|Chuang (Zhuang)]] || <code>za</code> || <code>zha</code>  | |||
|-  | |||
| [[wikipedia:Tibetic languages|Tibetan]] || <code>bo</code> || <code>bod</code>  | |||
|-  | |||
| [[wikipedia:Mongolian language|Mongolian]] || <code>mn</code> || <code>mon</code>  | |||
|-  | |||
| [[wikipedia:Uyghur language|Uyghur]] || <code>ug</code> || <code>uig</code>  | |||
|-  | |||
| [[wikipedia:Yue Chinese|Yue Chinese (Cantonese)]] || - || <code>yue</code>  | |||
|-  | |||
| [[wikipedia:Korean language|Korean]] || <code>ko</code> || <code>kor</code>  | |||
|-  | |||
| [[wikipedia:Japanese language|Japanese]] || <code>ja</code> || <code>jpn</code>  | |||
|-  | |||
| [[wikipedia:Thai language|Thai]] || <code>th</code> || <code>tha</code>  | |||
|-  | |||
| [[wikipedia:Arabic|Arabic]] || <code>ar</code> || <code>ara</code>  | |||
|-  | |||
| [[wikipedia:Hindi|Hindi]] || <code>hi</code> || <code>hin</code>  | |||
|}  | |||
{| class="wikitable" style="text-align: center;"  | |||
!width="50%" rowspan="2"| Names of languages and their variants  | |||
!width="50%" colspan="2"| Language code  | |||
|-  | |||
! ISO 639-1 !! ISO 639-3  | |||
|-  | |||
| [[wikipedia:Indonesian language|Indonesian]] || <code>id</code> || <code>ind</code>  | |||
|-  | |||
| [[wikipedia:Russian language|Russian]] || <code>ru</code> || <code>rus</code>  | |||
|-  | |||
| [[wikipedia:Spanish language|Spanish]] || <code>es</code> || <code>spa</code>  | |||
|-  | |||
| [[wikipedia:Portuguese language|Portuguese]] || <code>pt</code> || <code>por</code>  | |||
|-  | |||
| [[wikipedia:French language|French]] || <code>fr</code> || <code>fra</code>  | |||
|-  | |||
| [[wikipedia:German language|German]] || <code>de</code> || <code>deu</code>  | |||
|-  | |||
| [[wikipedia:Italian language|Italian]] || <code>it</code> || <code>ita</code>  | |||
|-  | |||
| [[wikipedia:Polish language|Polish]] || <code>pl</code> || <code>pol</code>  | |||
|-  | |||
| [[wikipedia:Ukrainian language|Ukrainian]] || <code>uk</code> || <code>ukr</code>  | |||
|-  | |||
| [[wikipedia:Turkish language|Turkish]] || <code>tr</code> || <code>tur</code>  | |||
|-  | |||
| [[wikipedia:Serbian language|Serbian]] || <code>sr</code> || <code>srp</code>  | |||
|-  | |||
| [[wikipedia:Danish language|Danish]] || <code>da</code> || <code>dan</code>  | |||
|-  | |||
| [[wikipedia:Sanskrit|Sanskrit]] || <code>sa</code> || <code>san</code>  | |||
|-  | |||
| [[wikipedia:Siddhaṃ|Siddhaṃ script]] || <code>sa-Sidd</code> || <code>san-Sidd</code>  | |||
|-  | |||
| [[wikipedia:Greek language|Greek]] || <code>el</code> || <code>ell</code>  | |||
|-  | |||
| [[wikipedia:Ancient Greek|Ancient Greek (to 1453)]] || - || <code>grc</code>  | |||
|-  | |||
| [[wikipedia:Latin|Latin]] || <code>la</code> || <code>lat</code>  | |||
|}  | |||
</div>  | |||
<includeonly>[[Category:Language templates]]</includeonly>  | <includeonly>[[Category:Language templates]]</includeonly>  | ||
The purpose of this template is to indicate that a span of text belongs to a particular language.
{{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|蓬莱山輝夜}} → 蓬莱山輝夜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.
| General meaning of the character | Chinese Simplify (Mainland China) | Chinese Traditional (Taiwan) | Japanese | Korean | 
|---|---|---|---|---|
| bone | 骨 | 骨 | 骨 | 骨 | 
| send | 送 | 送 | 送 | 送 | 
| shine | 耀 | 耀 | 耀 | 耀 | 
| 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
 |