Changes

Template:Otherlang

641 bytes added, 15:23, 14 April 2021
{{otherlang|de=Template:Otherlang:de}}<noinclude>
This template adds available translations for the page to the top through the use of flags.
== Syntax ==
<pre>
{{otherlang
| noborder=true (OPTIONAL)
| title=localized page display title
| lang=page:langtranslated page| lang2=page:lang2translated page2
| etc...
}}
</pre>
Warning! Do not include the language of the current page. This will only confuse readers.
=== Example ===
On a page called [[Template:Otherlang]]:
<pre>
{{otherlang
| title=Template:Otherlang
| deru=CategoryШаблон:Programming:deOtherlang
}}
</pre>
Note that:
* The language "<code>en</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.
|English
|en=Page_name
|[[File:EnIcons-flag-en.png]]|- id="ru"|Russian|ru=Page_name:ru|[[File:Icons-flag-ru.png]]|- id="cn"|Chinese (Simplified)|cn=Page_name:cn|[[File:Icons-flag-cn.png]]
|- id="de"
|DeutschGerman|decn=Page_name:de|[[File:DeIcons-flag-de.png]]
|}
</noinclude> {{#if: {{{title|}}} | {{DISPLAYTITLE:{{{title}}}}} }}<div style="position:relative;top:-42px;margin-bottom: -40px;float:right;text-align:right;padding:2px;line-height:11px;background:#000000{{#if: {{{noborder|}}} | margin-top:5px;border:0; | border:1px solid #000000;border-bottom:0;}}">{{#if: {{{en|}}} | '''[[File:EnIcons-flag-en.png|alt=English|link={{{en}}}]]''' }} {{#if: {{{deru|}}} | [[File:DeIcons-flag-ru.png|alt=Русский|link={{{ru}}}]] }} {{#if: {{{cn|}}} | [[File:Icons-flag-cn.png|alt=中文|link={{{cn}}}]] }} {{#if: {{{de|}}} | [[File:Icons-flag-de.png|alt=Deutsch|link={{{de}}}]] }}</div>