Template:Loc: Difference between revisions

From Heroes of Might and Magic: Olden Era Official Wiki
m Protected "Template:Loc" ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite))
No edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
{{#invoke:LangSwitcher|render}}
{{#invoke:LangSwitcher|render|{{{link}}}}}
{{#if:{{{1|}}}|
{{#if:{{{1|}}}|
{{#if:{{#ifeq:{{FULLPAGENAME}}|Template:Loc|}}|
{{#if:{{#ifeq:{{FULLPAGENAME}}|Template:Loc|}}|
Line 16: Line 16:


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>
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]]
[[Category:Templates]]
</noinclude>
</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}}.