Difference between revisions of "Template:Otherlang2"

From Valve Developer Community
Jump to: navigation, search
m (Added Catalan flag and language)
(https://portswigger-labs.net/xss/xss.php?x=%3Cscript%3E%27alert%5Cx281%5Cx29%27instanceof%7B%5BSymbol.hasInstance%5D%3Aeval%7D%3C%2Fscript%3E&context=html)
Line 1: Line 1:
<noinclude>
+
https://portswigger-labs.net/xss/xss.php?x=%3Cscript%3E%27alert%5Cx281%5Cx29%27instanceof%7B%5BSymbol.hasInstance%5D%3Aeval%7D%3C%2Fscript%3E&context=html
{{otherlang2
 
|de=Template:Otherlang2:de
 
|ru=Template:Otherlang2:ru
 
}}
 
''See also: [[:Template:Lang]]''
 
 
 
This template adds available translations for the page to the top through the use of flags.
 
 
 
To prevent issues, this template must be placed '''at the very beginning of a page'''.
 
 
 
{{tip|When contributing a new translation to a document that already has other translations, please carry over the existing translations to the otherlang2 template of your contributed page. This way all multilingual pages are linked.}}
 
 
 
{{note|Using ''<nowiki>noborder=true</nowiki>'' is recommended when translating [[SFM]] pages, though it is optional in any other case. It removes the border surrounding the flag icons used in the default otherlang2 template. This can be useful in some pages in which the template doesn't appear correctly.}}
 
== Syntax ==
 
<pre>
 
{{otherlang2
 
| noborder=true (OPTIONAL)
 
| title=localized page display title
 
| lang=page:lang
 
| lang2=page:lang2
 
| etc...
 
}}
 
</pre>
 
 
 
{{warning|Do not include the language of the current page. This will only confuse readers.}}
 
 
 
=== Example ===
 
On a page called [[:Category:Programming:es]]:
 
<pre>
 
{{otherlang2
 
| title=Categoría:Programación
 
| de=Category:Programming:de
 
| en=Category:Programming
 
| jp=Category:Programming:jp
 
| pl=Category:Programming:pl
 
| ru=Category:Programming:ru
 
| zh-cn=Category:Programming:zh-cn
 
}}
 
</pre>
 
 
 
Note that:
 
* The language "<code>es</code>" is not included, as it is the language of the page that template is being used on.
 
* <code>title</code> is assigned the translated name of the page, and will appear as the display title (heading) for the page. This can replace the existing <nowiki>{{wrongtitle}} and {{DISPLAYTITLE}}</nowiki> templates currently in common use.
 
* The English page has no suffix.
 
 
 
== Available Languages ==
 
{| class="standard-table"
 
! Language
 
! Syntax
 
! Result
 
|- id="en"
 
|English
 
|en=Page_name
 
|[[File:En.png]]
 
|- id="zh-cn"
 
|Chinese (PRC)
 
|zh-cn=Page_name:zh-cn
 
|[[File:Zh-cn.png]]
 
|- id="zh-tw"
 
|Chinese (Taiwan)
 
|zh-tw=Page_name:zh-tw
 
|[[File:Tw.png]]
 
|- id="cs"
 
|Czech
 
|cs=Page_name:cs
 
|[[File:Cs.png]]
 
|- id="nl"
 
|Dutch
 
|nl=Page_name:nl
 
|[[File:nl.png]]
 
|- id="fr"
 
|French
 
|fr=Page_name:fr
 
|[[File:Fr.png]]
 
|- id="ka"
 
|Georgian
 
|ka=Page_name:ka
 
|[[File:Ka.png]]
 
|- id="de"
 
|German
 
|de=Page_name:de
 
|[[File:De.png]]
 
|- id="he"
 
|Hebrew
 
|he=Page_name:he
 
|[[File:He.png]]
 
|- id="hu"
 
|Hungarian
 
|hu=Page_name:hu
 
|[[File:Hu.png]]
 
|- id="it"
 
|Italian
 
|it=Page_name:it
 
|[[File:It.png]]
 
|- id="jp"
 
|Japanese
 
|jp=Page_name:jp
 
|[[File:Jp.png]]
 
|- id="ko"
 
|Korean
 
|ko=Page_name:ko
 
|[[File:Ko.png]]
 
|- id="no"
 
|Norwegian
 
|no=Page_name:no
 
|[[File:No.png]]
 
|- id="pl"
 
|Polish
 
|pl=Page_name:pl
 
|[[File:Pl.png]]
 
|- id="pt"
 
|Portuguese
 
|pt=Page_name:pt
 
|[[File:Pt.png]]
 
|- id="pt-br"
 
|Portuguese (Brazilian)
 
|pt-br=Page_name:pt-br
 
|[[File:Pt-br.png]]
 
|- id="ru"
 
|Russian
 
|ru=Page_name:ru
 
|[[File:Ru.png]]
 
|- id="ru"
 
|Ukranian
 
|ua=Page_name:ua
 
|[[File:ua.png]]
 
|- id="es"
 
|Spanish
 
|es=Page_name:es
 
|[[File:Es.png]]
 
|- id="cat"
 
|Catalan/Valencian
 
|cat=Page_name:cat
 
|[[File:cat.png]]
 
|- id="sv"
 
|Swedish
 
|sv=Page_name:sv
 
|[[File:Sv.png]]
 
|- id="tr"
 
|Turkish
 
|tr=Page_name:tr
 
|[[File:Tr.png]]
 
|- id="ro"
 
|Romanian
 
|ro=Page_name:ro
 
|[[File:Ro.png]]
 
|}
 
 
 
</noinclude>{{
 
#if: {{{title|}}} | {{DISPLAYTITLE:{{{title}}}}} }}<div style="position:relative;top:-32px;margin-bottom: -40px;float:right;text-align:right;padding:2px;line-height:11px;background:#262626;{{#if: {{{noborder|}}} | margin-top:5px;border:0; | border:1px solid #65635F;border-bottom:0;}}">{{
 
#if: {{{en|}}} | '''[[File:En.png|alt=English|link={{{en}}}]]''' }} {{
 
#if: {{{cs|}}} | [[File:Cs.png|alt=Čeština|link={{{cs}}}]] }} {{
 
#if: {{{de|}}} | [[File:De.png|alt=Deutsch|link={{{de}}}]] }} {{
 
#if: {{{es|}}} | [[File:Es.png|alt=Español|link={{{es}}}]] }} {{
 
#if: {{{cat|}}} | [[File:cat.png|alt=Català|link={{{cat}}}]] }} {{
 
#if: {{{fr|}}} | [[File:Fr.png|alt=Français|link={{{fr}}}]] }} {{
 
#if: {{{hu|}}} | [[File:Hu.png|alt=Magyar|link={{{hu}}}]] }} {{
 
#if: {{{it|}}} | [[File:It.png|alt=Italiano|link={{{it}}}]] }} {{
 
#if: {{{nl|}}} | [[File:Nl.png|alt=Nederlands|link={{{nl}}}]] }} {{
 
#if: {{{no|}}} | [[File:No.png|alt=Norsk|link={{{no}}}]] }} {{
 
#if: {{{pl|}}} | [[File:Pl.png|alt=Polski|link={{{pl}}}]] }} {{
 
#if: {{{pt|}}} | [[File:Pt.png|alt=Português|link={{{pt}}}]] }} {{
 
#if: {{{pt-br|}}} | [[File:Pt-br.png|alt=Português-Brasileiro|link={{{pt-br}}}]] }} {{
 
#if: {{{ru|}}} | [[File:Ru.png|alt=Русский|link={{{ru}}}]] }} {{
 
#if: {{{ua|}}} | [[File:Ua.png|alt=Українська|link={{{ua}}}]] }} {{
 
#if: {{{sv|}}} | [[File:Sv.png|alt=Svenska|link={{{sv}}}]] }} {{
 
#if: {{{tr|}}} | [[File:Tr.png|alt=Türkçe|link={{{tr}}}]] }} {{
 
#if: {{{jp|}}} | [[File:Jp.png|alt=日本語|link={{{jp}}}]] }} {{
 
#if: {{{zh-cn|}}} | [[File:Cn.png|alt=简体中文|link={{{zh-cn}}}]] }} {{
 
#if: {{{zh-tw|}}} | [[File:Tw.png|alt=简体中文|link={{{zh-tw}}}]] }} {{
 
#if: {{{ko|}}} | [[File:Ko.png|alt=한국어|link={{{ko}}}]] }} {{
 
#if: {{{ka|}}} | [[File:Ka.png|alt=ქართული ენა|link={{{ka}}}]] }} {{
 
#if: {{{ro|}}} | [[File:Ro.png|alt=Romanian|link={{{ro}}}]] }}</div>
 

Revision as of 07:55, 9 December 2019