Module:Language/doc

&#x3c;!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see Wikidata) --&#x3e;

This module is used by and. It is inspired by the templates {{m}} and {{l}} and their associated modules on Wiktionary. It has a Wiktionary link function that links to the correct section of the Wiktionary entry, and applies correct language formatting and italics. The language-tagging function does most of what lang does, except that italics can't be customized and categories aren't added.

The module uses Module:Language/data to retrieve the language name for a language code, and to perform the necessary entry-name replacements (for instance, removing macrons from Latin entry names). These are unfortunately not automatically retrieved from Wiktionary's language data modules. For language codes that do not have a &#x3c;code&#x3e;name&#x3c;/code&#x3e; value in this module, the language name is fetched with &#x3c;code&#x3e;mw.language.fetchLanguage&#x3c;/code&#x3e;. When &#x3c;code&#x3e;mw.language.fetchLanguage&#x3c;/code&#x3e; does not fetch the correct language name (or any language name at all), please add it to Module:language/data, and similarly when the correct entry name is not generated, please add the entry name replacements to the module.

Examples
&#x3c;pre style="max-width: 30em;"&#x3e;
 * &#x3c;/pre&#x3e;
 * &#x3c;/pre&#x3e;
 * &#x3c;/pre&#x3e;
 * &#x3c;/pre&#x3e;
 * &#x3c;/pre&#x3e;
 * &#x3c;/pre&#x3e;
 * &#x3c;/pre&#x3e;
 * &#x3c;/pre&#x3e;
 * &#x3c;/pre&#x3e;

Invalid codes
&#x3c;pre style="max-width: 30em;"&#x3e;
 * &#x3c;/pre&#x3e;
 * &#x3c;/pre&#x3e;
 * &#x3c;/pre&#x3e;
 * &#x3c;/pre&#x3e;
 * &#x3c;/pre&#x3e;
 * &#x3c;/pre&#x3e;
 * &#x3c;/pre&#x3e;

Errors
&#x3c;pre&#x3e;* &#x3c;/pre&#x3e;

Tracking categories


&#x3c;includeonly&#x3e;&#x3c;/includeonly&#x3e;