Template:LanguageSelector
Loncat ke navigasi
Loncat ke pencarian
Dokumentasi templat[ lihat · sunting · riwayat · hapus singgahan ]
This documentation is transcluded from Template:LanguageSelector/doc.
Displays a configurable set of links that switch the page it's used on to another language. It is intended to complement {{LangSwitch}}, but you might find previously unintended uses. ;)
Usage
{{LanguageSelector |icons= |<unnamed parameters, numbered 2..40>= |notpiol= |action= }}
- The switch only applies to the page the template is transcluded on, clicking other links will return you to the language set in your MediaWiki preferences. This does not generally apply to script calls, e. g. "hide/show" links, or controls for sortable tables or other embedded stuff.
- The template can be used inline, it should not break any layout.
Parameter templat
Parameter | Keterangan | Baku | Status | |
---|---|---|---|---|
icons | determines what is displayed
| yes | opsional | |
<unnamed parameters, numbered 2..40> | A language code. If present, a link for the corresponding language will be produced. Up to 19 language codes can currently be specified, and will display in the order indicated by the parameter sequence. If no unnamed parameters are specified, all languages will be displayed in the default order. | optional | opsional | |
notpiol | dummy parameter, if assigned any value, it will suppress the 'This page in other languages: ' text | optional | opsional | |
action | passed through to {{UselangLink}}, read documentation there for further information | optional | opsional |
Additional information
The template is intended to be used in the following namespaces: all namespaces
The template is intended to be used by the following user groups: all users
Relies on:
- {{LanguageSelector/full}} produces a default set when no languages are specified
- {{LanguageSelector/switch}} maps language codes to icons
- {{LanguageSelector/link}} produces a link to a single language, optionally with icon
- {{UselangLink}}
- {{LanguageSelector/ThisPageIn}} returns "This page in other languages", supports LangSwitch
- {{LanguageSelector/InterLanguageSpacer}} used to separate the language links from each other
- {{LanguageSelector/iconfile}} returns filename of default icon for given language code
- {{LanguageSelector/IfPageExists}} cheap replacement for #ifexist: parser extension function
⧼Seealso⧽
Related templates
- {{Language versions}}
- {{autotranslate}} "used to show a template in the user's interface language"
- {{LangSwitch}} marks up translations of a given string, from which an appropriate language to display is selected based upon user preferences, resorting to default fallback languages when the requested one is not available
- {{LanguageSelectorFlags}} alias for {{LanguageSelector}}
- {{LanguageSelectorNoFlags}} wrapper that changes default behavior to
icons=no
- {{Fallback}} determines fallback language when the desired one isn't available, uses {{GetFallback}} and {{GetFallback2}} (secondary fallback language)
Language resources
If you want to add languages, the following resources might be useful
- User:Paradoctor/WikipediaLanguages list of all Wikipedia languages as of 12 January 2010
- Category:Flags of languages
- w:ISO-639 two- and three-letter language codes
- List of languages by English name
- List of languages in in their own writing systems, you can also plunder any article with lots of interwiki links, like w:sex
- meta:List of Wikipedias at Meta
- incubator:Main_Page list of proposed projects at Incubator
Examples
Code | Rendering on page |
---|---|
{{LanguageSelector|de|en|fr|invalid}} | |
{{LanguageSelector|de|en|fr|invalid|action=edit}} | |
{{LanguageSelector|de|en|fr|invalid|icons=code}} | |
{{LanguageSelector|de|en|fr|notpiol=1}} | |
{{LanguageSelector|de|en|fr|notpiol=1|icons=yes}} | |
{{LanguageSelector|de|en|fr|notpiol=1|icons=code}} | |
{{LanguageSelector|de|en|fr|notpiol=1|icons=only}} |
There are more examples with the default full list of languages on Template:LanguageSelector/doc/examples.
- (Dont put examples with all languages here at it would break the transclusion of the documentation subpage in the main template page).