Template:If language suffix/doc: Difference between revisions
Jump to navigation
Jump to search
imported>Ahopefulhobbit mNo edit summary |
imported>Ahopefulhobbit mNo edit summary |
||
| Line 1: | Line 1: | ||
This template is adapted from [https://wiki.factorio.com/Template: | This template is adapted from [https://wiki.factorio.com/Template:If_language_suffix the Factorio Wiki] | ||
Gets the language suffix from the pagename, with a <code>/</code> in front. Returns an empty string for no language suffix (English pages). See [[Template:Get language code]] for removing the <code>/</code> in front and getting "en" pages without a language suffix. | Gets the language suffix from the pagename, with a <code>/</code> in front. Returns an empty string for no language suffix (English pages). See [[Template:Get language code]] for removing the <code>/</code> in front and getting "en" pages without a language suffix. | ||
Revision as of 23:47, 2 December 2021
This template is adapted from the Factorio Wiki
Gets 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".