Template:Loc: Difference between revisions
From Heroes of Might and Magic: Olden Era Official Wiki
mNo edit summary |
No edit summary |
||
| (6 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
{{#invoke:LangSwitcher|render}} | {{#invoke:LangSwitcher|render|{{{link}}}}} | ||
{{#if:{{{1|}}}| | |||
{{#if:{{#ifeq:{{FULLPAGENAME}}|Template:Loc|}}| | |||
| | |||
{{DISPLAYTITLE:{{{1}}}}} | {{DISPLAYTITLE:{{{1}}}}} | ||
}} | |||
}} | |||
<noinclude> | |||
===Usage=== | |||
To generate the language table: | |||
<pre>{{loc}}</pre> | |||
To generate the language table AND change the page's display title: | |||
<pre>{{loc|display title goes here}}</pre> | |||
Use the latter to localize the page's display name e.g. the article <code>Units</code> title in Spanish would be <code><nowiki>{{loc|Unidades}}</nowiki></code> | |||
If the page's name is not in the <code><PageName>/<lang></code> format, you can link it using the <code>link</code> argument. | |||
<pre>{{loc|link=''<PageName>''/''<lang>''}}</pre> | |||
Use the latter the page's name is <code>Unidades</code> and you want to link it with the article <code>Units</code>: <code><nowiki>{{loc|link=Units/es}}</nowiki></code>. | |||
[[Category:Templates]] | |||
</noinclude> | |||
Latest revision as of 12:56, 6 November 2025
Usage
To generate the language table:
{{loc}}
To generate the language table AND change the page's display title:
{{loc|display title goes here}}
Use the latter to localize the page's display name e.g. the article Units title in Spanish would be {{loc|Unidades}}
If the page's name is not in the <PageName>/<lang> format, you can link it using the link argument.
{{loc|link=''<PageName>''/''<lang>''}}
Use the latter the page's name is Unidades and you want to link it with the article Units: {{loc|link=Units/es}}.


