Template:LangSwitch: Difference between revisions

Jump to navigation Jump to search
+ Slovenian; etc
(→‎Copyable sample: + Serbian)
(+ Slovenian; etc)
Line 41: Line 41:
The template is mainly used for translating templates.
The template is mainly used for translating templates.


Do note that many templates are based on tables and have to start from the beginning of the line, which is accomplished like in the below example, and that inserting blank lines will alter the way the template is rendered.
{{inote|Many templates are based on tables and thus have to start from the beginning of the line.  That is accomplished by putting them on a new line like in the example below.}}
 
{{inote|Inserting blank lines will alter the way the template is rendered.}}


  <nowiki>{{LangSwitch
  <nowiki>{{LangSwitch
Line 54: Line 56:
=== Using the lang parameter ===
=== Using the lang parameter ===
For testing and demonstration purposes the the '''lang ''' parameter can be used to override the automatic language selection.
For testing and demonstration purposes the the '''lang ''' parameter can be used to override the automatic language selection.
<pre><!-- Caveat: Google translated -->
<pre><!-- Caveat: Google translated -->
{{LangSwitch
{{LangSwitch
Line 78: Line 81:
== Copyable sample ==
== Copyable sample ==
Please uncomment used entries, in essence by dragging and dropping <code>&lt;!--</code> to the left of the name of the language.
Please uncomment used entries, in essence by dragging and dropping <code>&lt;!--</code> to the left of the name of the language.
  <nowiki>{{LangSwitch
  <nowiki>{{LangSwitch
<!-- | ca =  Catalan -->
<!-- | ca =  Catalan -->
Line 92: Line 96:
<!-- | pt =  Portugese -->
<!-- | pt =  Portugese -->
<!-- | ru =  Russian -->
<!-- | ru =  Russian -->
<!-- | sl =  Slovenian -->
<!-- | sr =  Serbian -->
<!-- | sr =  Serbian -->
<!-- | sv =  Swedish -->
<!-- | sv =  Swedish -->
Line 99: Line 104:


== Known issues ==
== Known issues ==
Using some characters like equal signs ('''<nowiki>=</nowiki>''') and pipes/vertical strokes ('''<nowiki>|</nowiki>''') inside template parameters will break the template.  Do note that pipes will break tables and that this workaround have to be used for tables.  Ways around this is to either use {{tl|{{=}}}}, {{tl|!}}, {{tl|!!}} {{tl|!-}} or or &lt;nowiki&gt;<nowiki>=</nowiki>&lt;/nowiki&gt;, &lt;nowiki&gt;<nowiki>|</nowiki>&lt;/nowiki&gt;, &lt;nowiki&gt;<nowiki>||</nowiki>&lt;/nowiki&gt; or &lt;nowiki&gt;<nowiki>|</nowiki>-&lt;/nowiki&gt;.
Using some characters like equal signs ('''<nowiki>=</nowiki>''') and pipes/vertical strokes ('''<nowiki>|</nowiki>''') inside template parameters will break the template.  Do note that pipes will break tables and that this workaround have to be used for tables.  Ways around this is to either use {{tl|{{=}}}}, {{tl|!}}, {{tl|!!}} or {{tl|!-}}, or &lt;nowiki&gt;<nowiki>=</nowiki>&lt;/nowiki&gt;, &lt;nowiki&gt;<nowiki>|</nowiki>&lt;/nowiki&gt;, &lt;nowiki&gt;<nowiki>||</nowiki>&lt;/nowiki&gt; or &lt;nowiki&gt;<nowiki>|</nowiki>-&lt;/nowiki&gt;.


== Related content ==
== Related content ==

Navigation menu