Template:Localized/doc
Appearance
This is the documentation subpage for the parent Template:Localized page.
Retrieves the name of a localized template, using the base template name given in parameter 1. Such localizable base template has subpages named with the language code.
The returned value is the full page name that can be used for transclusion.
If no localized page exists for that template in the tested language, then the full name of the base template will be returned (if it exists too).
If the base template does not even exist, the full page name of Template:Localized/Missing will be returned to signal the invalid or missing parameter 1 that should be a valid template name without the namespace prefix (that must be passed separately if this is not "Template").
- Usage:
- {{Localized
- | 1=base template name
- | ns=namespace
- | lang=uilangcode
- }}
- Parameters:
- 1= (mandatory) base template name (without any namespace prefix and without any language code subpage)
- ns= (optional) alternate namespace to test (default namespace is Template)
- lang= language code to test (the default code used is the language code taken from a localized subpage where this template is inserted, otherwise the default is {{USERLANGUAGE}} on non localized pages)
- Example:
- {{Localized
- | 1=Intro
- }} generates:
Template:Intro/en
- See also: