Localized Strings
This stylesheet contains templates for getting localized strings, including format strings and plural forms. Format strings are important for proper localization, as constructing sentences from concatenation often produces poor results in many languages.
By default, the templates in this stylesheet work on the translations shipped with yelp-xsl, but the templates can be reused by yelp-xsl extensions (or even entirely separate stylesheets) by installing XML files with the translations under the domains subdirectory of the directory holding this file. The format of the file is designed to work well with itstool's join mode.
Defines Parameters
- l10n.locale — The top-level locale of the document.
Defines Keys
- l10n.msgstr.key — Get a translated message from an ID and a language.
Defines Templates
- l10n.align.end — Determine the end alignment.
- l10n.align.start — Determine the start alignment.
- l10n.direction — Determine the text direction for a language.
- l10n.gettext — Look up the translation for a string.
- l10n.plural.form — Extract the plural form index for a given cardinality.
Defines Modes
- l10n.format.mode — Process format strings from l10n.gettext.
Calls Parameters
Calls Keys
Calls Modes
Implements Templates
Mode |
Match |
---|---|
* |
|
msg:node |
|
msg:string |