Template:Localization/doc

Localization mechanism for templates. Use L10n for short.

Usage
Namespace
 * Parameter 1

Key
 * Parameter 2

Language, will be  by default.
 * Parameter 3 (optional)

Placeholders for format, will be replaced, see the example below.
 * All named Parameters prefixed with

It will retrieve text of specified key for current language from localization database, If the text for current language does not exist, will use EN version instead.

You can define placeholder(s) for format purpose, for example: A:

B: will result:

See l10n/register for about how to register localization info.

Example
Take hint for example:

Register localization info first:

then in template code, use l10n to retrieve text for current language from localization database, e.g., see source code of l10n for detail.

Example:

If you need to translate the template into another language, just add the registration code for the corresponding language.