Extension:I18nTags

Category:Extensions without an imageCategory:Extensions without a compatibility policyCategory:GPL licensed extensions
MediaWiki extensions manual
I18nTags
Release status: stableCategory:Stable extensions
Implementation Tag Category:Tag extensions, Parser function Category:Parser function extensions
Description Provides access the i18n functions for number formatting, grammar and plural in any available language
Author(s) Niklas Laxström (Nikerabbittalk)
Latest version 2018-08-06
MediaWiki >= 1.35.0
Database changes No
License GNU General Public License 2.0 or later
Download Category:Extensions in Wikimedia version control
Example translatewiki.net
Quarterly downloads 2 (Ranked 99th)
Translate the I18nTags extension if it is available at translatewiki.net
Category:All extensions

The I18nTags extension provides access to i18n functions for number formatting, grammar and plural in any available language.

Installation

  • Download and move the extracted I18nTags folder to your extensions/ directory.
    Developers and code contributors should install the extension from Git instead, using:cd extensions/
    git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/I18nTags
  • Add the following code at the bottom of your LocalSettings.php file:
    wfLoadExtension( 'I18nTags' );
    
  • Optionally install the CLDR extension to get languages names in any language.
  • Yes Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

Features

This section is outdated, see the discussion page
{{#languagename:}}
Get the language's name in the user language. You can override the user language by passing in a language code (or native) as an additional parameter.
SyntaxUser languageOutput
{{#languagename:fr}}EnglishFrench
{{#languagename:fr}}GermanFranzösisch
{{#languagename:fr|de}}anyFranzösisch
{{#languagename:fr|fr}}anyFrançais
{{#languagename:fr|native}}anyFrançais
<formatnum>
Like {{#formatnum:}} but for any language. To choose the language, use <formatnum lang="..."></formatnum>.
<grammar>
Like {{#grammar:}} but for any language. To choose the language, use <grammar lang="..."></grammar>.
<plural>
Like {{#plural:}} but for any language. To choose the language, use <plural lang="..." n="..."></plural>. For example, <plural lang="cs" n="8">soubor|soubory|souborů</plural> is equivalent to {{PLURAL:$1|soubor|soubory|souborů}}, with the language being Czech (cs) and $1 being 8.
<linktrail>
Emulates the linktrail for a specific language.
Category:All extensions Category:Extensions in Wikimedia version control Category:Extensions without a compatibility policy Category:Extensions without an image Category:GPL licensed extensions Category:ParserFirstCallInit extensions Category:Parser function extensions Category:Stable extensions Category:Tag extensions