Template:Loc
Usage Examples
| Page Language | Template Call | Output |
|---|---|---|
| en | {{Loc|Labels|vehicles}}
|
Vehicles |
| de | Fahrzeuge | |
{{Loc|Labels|vehicles|link=true}}
|
Fahrzeuge | |
{{Loc|Labels|downloadable_content|link=Vehicles}}
|
Zusatzinhalte |
TemplateData
This template makes use of p.localise() from Module:Common to retrieve a localised string for a given key from a specified MessageBundle.
It auto-switches to the language that the viewer's page is currently on, and falls back to the English source if no translation exists for the current language.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| MessageBundle Name | 1 | The name of the MessageBundle to look up (without the `MessageBundle:` prefix). | String | required |
| Key | 2 | The key to retrieve from the MessageBundle. | String | required |
| Link | link | If set to true, wraps the result as a link to the page matching the key's English value. If set to a page title instead, switches the link target to that page. In all cases, the link resolves to a translated subpage of the target matching the current page's language, falling back to English if none exists.
| String | optional |