Template:Langswitch/doc

From Gentoo Wiki
Jump to:navigation Jump to:search
Note
This page is a template. It contains some standardized, often used text, which can be transcluded inside other pages. As this template is widely used in our wiki, it may be protected in which case only staff members can change it. Use the discussion page to propose enhancements or fixes, or to voice your opinion.

Test {{SUBPAGENAME}} variable (or magic word) of given article (by {{See also}} template) and compare with listed in this template national language codes. If matched, this template will return (to {{See also}} template) the same language code with slash. For example if {{SUBPAGENAME}} ends with de then /de returned. If no matching two to four letter language codes are found then nothing returned.

Warning
This template should be written in one line. Otherwise it will not operate correctly.

Usage

This template is necessary to get 'translation' support for the {{See also}} template; it can be considered a child template and not to be called directly.

See the template's testcases:


No parameter
Wiki code {{Langswitch}}

Main version
Sandbox version

See also

External resources