Template:Languages light/doc
This is a documentation subpage for Template:Languages light. It contains usage information, categories, and other content that is not part of the original template page. |
Usage
[edit]Shows a navigation list of native language names, for which a subpage (named with the language code) exists containing a translation of a specified base page name.
The first displayed link links to the specified base page name (it should be in English on Meta-Wiki) used as source for translations.
Warning
[edit]The default template (Template:Languages/Lang) used to render each language code generates about 300 calls to the costly ParserFuntion #ifexist:
when using this template with only the base page name in its first parameter.
Because there's currently a MediaWiki limitation of calls to costly parser functions currently defined to 500, the current template must not be used more than once per page.
It is possible to avoid all these tests (for checking the effective existence of per-language subpages) by providing an alternate template to render the list of language codes (see the second example below which renders faster without any costly ParserFunction used, but then will render red links for missing subpages). Such syntax will allow customizing the links (for example to produce narrow matrixes of showing language codes only, even if they contain red links), and to produce multiple lists on the same page without exhausting the current parser limit.
Example
[edit]{{Languages light|Main Page}}
(uses Template:Languages/Lang to render each tested language code)
{{Languages light|Category:Community|t=Languages/Lang/all}}
(use the specified template to render language codes)