Template:Multilingual description
This documentation is transcluded from Template:Multilingual description/doc.
This template allows you to write descriptions in different languages, to display only the one set in the user preferences. It also allows you to select and display a different language using a form.
Contents
Usage
{{Multilingual description |xx
= }}
Or use the shorthand {{Mld|… parameters as described …}}
For the creation of the form-select and folding of languages, JavaScript is required. This JavaScript is implemented as default gadget at Wikimedia Commons, namely “Language select”, and can be switched off amending the preferences. (Activate the LanguageSelect gadget now! // Disable the LanguageSelect gadget now!)
The gadget will also fold descriptions in multiple languages and create a form-select, if more than a threshold are written consecutively on a page using language templates like {{en}}, {{fr}}, {{es}}.
Help for choosing the right template for your use case:
Criterion \\ Template | {{Multilingual description}} | {{en}}{{fr}}… | {{LangSwitch}} | {{Autotranslate}} | {{TNT}} |
---|---|---|---|---|---|
Requires JavaScript enabled for folding | + | + | - | - | - |
Folding can be disabled by user | + | + | - | - | - |
Folding is done server-side | - | - | + | + | + |
Folding when at least x languages are provided | 1 | 4 | 1 | 1 | 1 |
Collation order of languages (when not folded) | Latin, Latin or Cyrillic, Cyrillic, Greek, Other simple LTR alphabets, Indic, Other South Asian, Syllabaries, Hangul, Japanese scripts, Sinograms, (RTL) Hebrew, (RTL) Arabic languages | as provided by the user in the wikitext | // | // | // |
Search indexing issues | - | - | + | partially (where used; language subpages of templates are indexed) | - |
Recommended use at | categories, galleries | file description pages | small templates, whenever the previous options are not suitable | larger templates when used on pages that do not have language subpages (e.g. not having Main page/en , Main page/de ) and where the language displayed will be automatically determined by the language set in user preferences | larger templates when used on pages that do have language subpages; most of the time these will be pages prepared with the Translate Extension |
Contains expensive parser functions | - | - | - | + | + |
Template parameters
Parameter | Description | Default | Status | |
---|---|---|---|---|
| xx can be any number of any supported language codes | string in language xx | optional |
Additional information
The template is intended to be used in the following namespaces: no namespace specified
The template is intended to be used by the following user groups: no user group specified
Relies on:
- MediaWiki:Gadget-LanguageSelect.js
- Module:Multilingual description
- Module:Multilingual description/sort
See also
- {{LangSwitch}}
Localization
This template is not intended to be localized.
Example
{{Multilingual description | be-tarask = '''Беларускі''' тэкст. Калі няма тэксту на адпаведнай мове, дапомна будуць адлюстраваныя тэксты на ўсіх мовах. | ca = texto en '''català'''. | de = '''deutscher''' Text. | diq = No nuşte Zazakiyo. | en = '''English''' text, if the text corresponding to the chosen language to display is not available, all languages will be displayed by default. | fr = texte '''français''', si le texte correspondant à la langue choisie n’est pas disponible, toutes les langues seront affichées par défaut. | it = Testo '''italiano'''. | ja = 日本語の文字。もし選択した言語に対応したテキストが正しく表示されない場合、デフォルトで全ての言語で表示されます。 | mk = Текст на '''македонски'''. Ако нема текст што соодветствува на одбраниот јазик, тогаш по основно ќе се прикажат сите јазици. | pt = Texto em '''português'''. | pt-br = texto em '''português do Brasil''', se o texto correspondente ao idioma escolhido não estiver disponível, o texto será exibido por padrão em todos os idiomas disponíveis. | ru = '''Русский''' текст. }}
produces: