Template:Language/archives/Autolang: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
(optimized the code)
Line 1: Line 1:
<includeonly><onlyinclude>{{#switch:{{uilang}}
<includeonly><onlyinclude>{{#switch:{{uilang}}
|#default={{{1|}}}
|#default={{{1|}}}
|en={{#if:{{{en|}}}|{{{en|}}}|{{{1|}}}}}
|en={{{en|{{{1|}}}}}}
|ca={{#if:{{{ca|}}}|{{{ca|}}}|{{{1|}}}}}
|ca={{{ca|{{{1|}}}}}}
|cs={{#if:{{{cs|}}}|{{{cs|}}}|{{{1|}}}}}
|cs={{{cs|{{{1|}}}}}}
|de={{#if:{{{de|}}}|{{{de|}}}|{{{1|}}}}}
|de={{{de|{{{1|}}}}}}
|es={{#if:{{{es|}}}|{{{es|}}}|{{{1|}}}}}
|es={{{es|{{{1|}}}}}}
|et={{#if:{{{et|}}}|{{{et|}}}|{{{1|}}}}}
|et={{{et|{{{1|}}}}}}
|fr={{#if:{{{fr|}}}|{{{fr|}}}|{{{1|}}}}}
|fr={{{fr|{{{1|}}}}}}
|hu={{#if:{{{hu|}}}|{{{hu|}}}|{{{1|}}}}}
|hu={{{hu|{{{1|}}}}}}
|it={{#if:{{{it|}}}|{{{it|}}}|{{{1|}}}}}
|it={{{it|{{{1|}}}}}}
|nl={{#if:{{{nl|}}}|{{{nl|}}}|{{{1|}}}}}
|nl={{{nl|{{{1|}}}}}}
|no={{#if:{{{no|}}}|{{{no|}}}|{{{1|}}}}}
|no={{{no|{{{1|}}}}}}
|pl={{#if:{{{pl|}}}|{{{pl|}}}|{{{1|}}}}}
|pl={{{pl|{{{1|}}}}}}
|pt={{#if:{{{pt|}}}|{{{pt|}}}|{{{1|}}}}}
|pt={{{pt|{{{1|}}}}}}
|pt-br={{#if:{{{pt-bt|}}}|{{{pt-br|}}}|{{{1|}}}}}
|pt-br={{{pt-br|{{{1|}}}}}}
|ru={{#if:{{{ru|}}}|{{{ru|}}}|{{{1|}}}}}
|ru={{{ru|{{{1|}}}}}}
|uk={{#if:{{{uk|}}}|{{{uk|}}}|{{{1|}}}}}
|uk={{{uk|{{{1|}}}}}}
|sv={{#if:{{{sv|}}}|{{{sv|}}}|{{{1|}}}}}
|sv={{{sv|{{{1|}}}}}}
|tr={{#if:{{{tr|}}}|{{{tr|}}}|{{{1|}}}}}
|tr={{{tr|{{{1|}}}}}}
|ja={{#if:{{{ja|}}}|{{{ja|}}}|{{{1|}}}}}
|ja={{{ja|{{{1|}}}}}}
|zh-cn={{#if:{{{zh-cn|}}}|{{{zh-cn|}}}|{{{1|}}}}}
|zh-cn={{{zh-cn|{{{1|}}}}}}
|zh-tw={{#if:{{{ct|}}}|{{{ct|}}}|{{{1|}}}}}
|zh-tw={{{zh-tw|{{{1|}}}}}}
|ko={{#if:{{{ko|}}}|{{{ko|}}}|{{{1|}}}}}
|ko={{{ko|{{{1|}}}}}}
|ka={{#if:{{{ka|}}}|{{{ka|}}}|{{{1|}}}}}
|ka={{{ka|{{{1|}}}}}}
|he={{#if:{{{he|}}}|{{{he|}}}|{{{1|}}}}}
|he={{{he|{{{1|}}}}}}
}}</onlyinclude></includeonly>
}}</onlyinclude></includeonly>
{{documentation|content=This template can change the content automaticaly according to the language of the UI. Should use with {{tl|uselang}}.
{{documentation|content=This template can change the content automaticaly according to the language of the UI. Should use with {{tl|uselang}}.

Revision as of 07:24, 4 January 2023

English (en)Deutsch (de)Esperanto (eo)Español (es)Français (fr)Suomi (fi)Hrvatski (hr)Magyar (hu)Italiano (it)日本語 (ja)한국어 (ko)Nederlands (nl)Polski (pl)Português (pt)Português do Brasil (pt-br)Русский (ru)Slovenčina (sk)Svenska (sv)Türkçe (tr)Українська (uk)Tiếng Việt (vi)中文 (zh)中文(臺灣) (zh-tw)
Curly brackets white.pngTemplate Documentation [view] [edit]
Icon-translate.png Available doc translations

This template can change the content automaticaly according to the language of the UI. Should use with {{uselang}}.

Usage

Parameters

  • {{{1}}} - (Unnamed parameter) the default value to show (when this language has not translation). It should be in English.
  • {{{<lang code>}}} - The value should be the content of this language. See examples for details.

Examples

Template:Uselang The buttons on the right can help you change the language of the UI easily.
{{autolang|Document}} → Document
{{autolang|Document|zh-cn=文档}} → Document
{{autolang|Document|ru=документ|zh-cn=文档|de=Dokument|ja=文書|fr=Document}} → Document

See Also

  • {{uselang}}
  • {{uilang}}