Difference between revisions of "Template:Lang"

From Moegirlpedia
Jump to: navigation, search
m (<includeonly>)
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<span lang="{{lc:{{{1}}}}}" xml:lang="{{lc:{{{1}}}}}">{{#switch:{{lc:{{{1|}}}}}
+
<includeonly><span lang="{{lc:{{{1}}}}}" xml:lang="{{lc:{{{1}}}}}" {{#if:{{{3|}}}||title="{{#switch:{{{1}}}<!--
 +
-->|zh|zho=Chinese|zh-Hans|zho-Hans=Simplify Chinese|zh-Hant|zho-Hant=Traditional Chinese<!--
 +
-->|zh-CN|zh-cn|zho-CN|zho-cn=Chinese (Mainland China)|zh-TW|zh-tw|zho-TW|zho-tw=Chinese (Taiwan)|zh-HK|zh-hk|zho-HK|zho-hk=Chinese (Hong Kong)<!--
 +
-->|en|eng=English|ja|jpn=Japanese|ru|rus=Russian|es|spa=Spanish|pt|por=Portuguese|la|lat=Latin|grc=Ancient Greek (to 1453)|ar|ara=Arabic<!--
 +
-->|ko|kor=Korean|za|zha=Chuang|bo|bod=Tibetan|mn|mon=Mongolian|ug|uig=Uyghur|yue=Yue Chinese (Cantonese)|th|tha=Thai|hi|hin=Hindi|id|ind=Indonesian<!--
 +
-->|fr|fra=French|de|deu=German|it|ita=Italian|pl|pol=Polish|uk|ukr=Ukrainian|tr|tur=Turkish|el|ell=Greek|sr|srp=Serbian|da|dan=Danish|sa|san=Sanskrit<!--
 +
-->|kr=Kanuri|#default={{#language:{{lc:{{{1}}}}}|en}}}}"}}>{{#switch:{{lc:{{{1|}}}}}
 
  |zh|gan|zh-yue = {{{2}}}
 
  |zh|gan|zh-yue = {{{2}}}
  |jp|jap = -{{{{2}}}}-<span class="error" style="font-size:smaller;">模板參數錯誤:[[日語]]請使用'''ja'''</span>
+
  |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;">模板參數錯誤:[[希臘語]]請使用'''el''''''gre'''</span>
+
  |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;">模板參數錯誤:[[朝鮮語]]請使用'''ko'''或'''kor'''。kr為[[卡努里語]],如該語言條目已建立,請至[[Template talk:Lang]]回報取消此警告。</span>
+
  |kr = -{{{{2}}}}-<sup>[[wikipedia:Kanuri|Kanuri]]</sup>
  |kp = -{{{{2}}}}-<span class="error" style="font-size:smaller;">模板參數錯誤:[[朝鮮語]]請使用'''ko''''''kor'''</span>
+
  |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;">模板參數錯誤:[[波蘭語]]請使用'''pl''''''pol'''</span>
+
  |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;">模板參數錯誤:[[西班牙語]]請使用'''es''''''spa'''</span>
+
  |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;">模板參數錯誤:[[捷克語]]請使用'''cs''''''cze'''</span>
+
  |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;">模板參數錯誤:[[哈薩克語]]請使用'''kk''''''kaz'''</span>
+
  |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;">模板參數錯誤:[[丹麥語]]請使用'''da'''</span>
+
  |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;">模板參數錯誤:請檢查更正引用語言代碼</span>
+
  |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 = &#8206;
 
  |ar|fa|he|ps|ur = &#8206;
 
  |#default = }}{{#if:{{NAMESPACE}}|
 
  |#default = }}{{#if:{{NAMESPACE}}|
  <!-- |[[Category:含有{{#switch:{{lc:{{{1|}}}}}
+
  <!-- |[[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:含有{{ISO 639 name {{lc:{{{1|}}}}}}}的條目
+
   |#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>
+
}}</includeonly><noinclude>{{documentation}}</noinclude>

Latest revision as of 18:56, 14 April 2022

Template-info.svg Template Documentation  [View] [Edit] [History] [Refresh]

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