<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://insultplayers.ru/killingfloor/w/index.php?action=history&amp;feed=atom&amp;title=Help%3ATranslation_switching</id>
	<title>Help:Translation switching - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://insultplayers.ru/killingfloor/w/index.php?action=history&amp;feed=atom&amp;title=Help%3ATranslation_switching"/>
	<link rel="alternate" type="text/html" href="https://insultplayers.ru/killingfloor/w/index.php?title=Help:Translation_switching&amp;action=history"/>
	<updated>2026-09-07T15:31:35Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.9</generator>
	<entry>
		<id>https://insultplayers.ru/killingfloor/w/index.php?title=Help:Translation_switching&amp;diff=3175&amp;oldid=prev</id>
		<title>Maintenance script: Archived wikitext recovered with documented compatibility adjustments from the WikiTeam export dated 20150707; original revision 13345 and attribution retained</title>
		<link rel="alternate" type="text/html" href="https://insultplayers.ru/killingfloor/w/index.php?title=Help:Translation_switching&amp;diff=3175&amp;oldid=prev"/>
		<updated>2026-09-07T07:32:59Z</updated>

		<summary type="html">&lt;p&gt;Archived wikitext recovered with documented compatibility adjustments from the WikiTeam export dated 20150707; original revision 13345 and attribution retained&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;Translation switching&amp;#039;&amp;#039;&amp;#039; is used on many templates and other message boxes across the wiki. The template &amp;#039;&amp;#039;&amp;#039;{{tl|lang}}&amp;#039;&amp;#039;&amp;#039; detects the name of the language page and &amp;#039;&amp;#039;switches&amp;#039;&amp;#039; the text. Its main purpose is to keep all localized versions of text centralized into one template. &lt;br /&gt;
&lt;br /&gt;
In the past, translators would create pages like &amp;#039;&amp;#039;Template:Cleanup/ru&amp;#039;&amp;#039;, which would lead to a lot of misplaced and inconsistent localized templates. Now all translators have to do is simply add a few lines of code to the existing [[Template:Cleanup]] page and whenever that template is used on a Russian page, the template will automatically switch to show the Russian text.&lt;br /&gt;
&lt;br /&gt;
== What should use translation switching? ==&lt;br /&gt;
&lt;br /&gt;
In general, all templates should use it. This includes infoboxes to maintenance messages, among others.&lt;br /&gt;
&lt;br /&gt;
== How to add localized strings ==&lt;br /&gt;
&lt;br /&gt;
# Select a template from the [[:Category:Templates that use translation switching|list of templates]] that use translation switching.&lt;br /&gt;
# Edit the template and add your strings (please use alphabetical ordering for convenience). &lt;br /&gt;
# Update the template {{tl|translation switching}} or {{tl|ts}} towards the bottom of the page and add your language code to the list.&lt;br /&gt;
&lt;br /&gt;
=== Example ===&lt;br /&gt;
Let&amp;#039;s say you&amp;#039;re adding Italian strings to a template. The template might already look like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
{{lang&lt;br /&gt;
  | cs = Vítejte&lt;br /&gt;
  | de = Willkommen&lt;br /&gt;
  | en = Welcome&lt;br /&gt;
  | ja = Irashaimasu&lt;br /&gt;
  | ru = Добро пожаловать&lt;br /&gt;
  }}&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
{{translation switching|cs, de, ja, ru}}&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So add your lines, copying the style of the ones above and below, so it looks like this:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;{{lang&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
   | cs = Vítejte&lt;br /&gt;
   | de = Willkommen&lt;br /&gt;
   | en = Welcome&lt;br /&gt;
   &amp;lt;span style=&amp;quot;font-weight:bolder;font-size:110%;color:#006F00;&amp;quot;&amp;gt;| it = Benvenuto&amp;lt;/span&amp;gt;&lt;br /&gt;
   | ja = Irashaimasu&lt;br /&gt;
   | ru = Добро пожаловать&lt;br /&gt;
   }}&lt;br /&gt;
 &lt;br /&gt;
 ...&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;nowiki&amp;gt;{{&amp;lt;/nowiki&amp;gt;translation switching|cs, de, &amp;lt;span style=&amp;quot;font-weight:bolder;font-size:115%;color:#006F00;&amp;quot;&amp;gt;it,&amp;lt;/span&amp;gt; ja, ru}}&lt;br /&gt;
&lt;br /&gt;
Make sure to add the language to the {{tl|translation switching}} template towards the bottom of the page, also.&lt;br /&gt;
&lt;br /&gt;
:&amp;#039;&amp;#039;&amp;#039;important&amp;#039;&amp;#039;&amp;#039;: Remember to add language strings in alphabetical order.&lt;br /&gt;
&lt;br /&gt;
== Templates without translation switching ==&lt;br /&gt;
If you come across a particular template that requires translation switching and you want to add it, then feel free to make a start. The instructions below detail how to add {{tl|lang}} to templates. &lt;br /&gt;
&lt;br /&gt;
You may also wish to take a look at the [[:Category:Templates that use translation switching|list of other templates]] that have localized strings to try and copy the layout. Be aware of more intricate templates such as [[:Category:Infobox templates|infobox templates]] as their uses of {{tl|lang}} can be appear to be quite complex.&lt;br /&gt;
&lt;br /&gt;
If you need help with a particular template, simply post on the talk page of it or contact one of the [[Help:Group rights|moderators]] or [[Help:Group rights|admins]], as they&amp;#039;d be happy to help you.&lt;br /&gt;
&lt;br /&gt;
=== Parts of templates ===&lt;br /&gt;
Let&amp;#039;s say a template contains the text:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;margin-left:2em;&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
Lorem ipsum dolor &amp;#039;&amp;#039;&amp;#039;[[Welcome]]&amp;#039;&amp;#039;&amp;#039; lorem ipsum.&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now after modifying it for translation switching:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;margin-left:2em;&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
Lorem ipsum dolor &amp;#039;&amp;#039;&amp;#039;[[{{lang&lt;br /&gt;
 | en = Welcome&lt;br /&gt;
 | ja = Irashaimasu&lt;br /&gt;
 }}]]&amp;#039;&amp;#039;&amp;#039; lorem ipsum.&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notice there are no extra line breaks or spaces, like there are in this example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;margin-left:2em;&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
Lorem ipsum dolor &amp;#039;&amp;#039;&amp;#039;[[&lt;br /&gt;
&lt;br /&gt;
{{lang&lt;br /&gt;
| en = Welcome&lt;br /&gt;
| ja = Irashaimasu&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
]]&amp;#039;&amp;#039;&amp;#039; lorem ipsum.&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can have as many line breaks as you want &amp;#039;&amp;#039;inside&amp;#039;&amp;#039; lang&amp;#039;s {{code|&amp;amp;#123;&amp;amp;#123;}} brackets {{code|&amp;amp;#125;&amp;amp;#125;}}, but &amp;#039;&amp;#039;outside&amp;#039;&amp;#039; there must be no spaces, line breaks or gaps at all.&lt;br /&gt;
&lt;br /&gt;
=== Language links ===&lt;br /&gt;
Sometimes you may need to switch a link based on the language. A template may look like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;margin-left:2em;&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
[[Welcome|{{lang&lt;br /&gt;
| en = Welcome&lt;br /&gt;
| fr =  Accueil&lt;br /&gt;
}}]]&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
But you want the link to go to [[Welcome/fr]] instead of [[Welcome]]. This does the job:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;margin-left:2em;&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
[[Welcome{{if lang}}|{{lang&lt;br /&gt;
| en = Welcome&lt;br /&gt;
| fr = Accueil&lt;br /&gt;
}}]]&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{tl|if lang}} tests whether the page is a language page, and if it is, it&amp;#039;ll output the language code (in this case, it&amp;#039;s {{code|/fr}}). So the link in this example will go to [[Welcome/fr]], and the text displayed on the link will be French, as well.&lt;br /&gt;
&lt;br /&gt;
It&amp;#039;s important to not put a space in front of {{tl|if lang}} (for example {{code|1=[[Hats &amp;lt;nowiki&amp;gt;{{if lang}}&amp;lt;/nowiki&amp;gt;]]}}) This is because, when used in a link, it will produce [[Hats_/fr]] instead of [[Hats/fr]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;kf-restoration-note&amp;quot;&amp;gt;Archived wikitext recovered with documented compatibility adjustments from the WikiTeam export in the [https://archive.org/details/wiki-kf_wikicom archived KF-Wiki collection] (export 2015-07-07, original revision 13345). Credit: the original KF-Wiki contributors; the linked export preserves the original authorship and revision history. Restoration compatibility adjustment: the unavailable formatting-only c helper is replaced by simple emphasis, preserving its word.&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Maintenance script</name></author>
	</entry>
</feed>