Template:If language suffix: Difference between revisions
		
		
		
		Jump to navigation
		Jump to search
		
|  wrong lang code for Korean |  Added Chinese Traditional language support | ||
| (5 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
| {{#switch:{{Language suffix}} | {{#switch:{{Language suffix}} | ||
| | cs | de | es | fr | it | ja | ko | ms | nl | pl | pt-br | ru | sv | tr | uk | zh = /{{Language suffix}} | | cs | da | de | es | fr | hu | it | ja | ko | ms | nl | pl | pt-br | pt-pt | ru | sv | tr | uk | vi | zh | zh-tw = /{{Language suffix}} | ||
| }} | }}<noinclude> | ||
| {{documentation}} | |||
| [[Category:Localisation templates]] | |||
| </noinclude> | |||
Latest revision as of 16:39, 7 March 2023
[View] [Edit] [Page history]
DocumentationGets the language suffix from the pagename, with a / in front. Returns an empty string for no language suffix (English pages). See Template:Get language code for removing the / in front and getting "en" pages without a language suffix.
Example 1: Page the template is on: "Infobox:Accumulator" -> {{Language suffix}} gives "".
Example 2: Page the template is on: "Accumulator/de" -> {{Language suffix}} gives "/de".
Example 3: Page the template is on: "Infobox:Accumulator/de" -> {{Language suffix}} gives "/de". List of all templates