Template:Multilingual description/doc: Difference between revisions
More actions
No edit summary |
No edit summary |
||
| (2 intermediate revisions by 2 users not shown) | |||
| Line 5: | Line 5: | ||
|name=Multilingual description | |name=Multilingual description | ||
|desc- | |desc-en=This template allows you to write descriptions in different languages, and to display only the one that is set in the user preferences. It also allows you to select and display a different language using a drop-down form. | ||
|desc-bar=De Vorlåg erlaubt des Schreibn eina Beschreibung in mehreren Språchn, um dann nur die Beschreibung in dea Sprachn einblendn zu lassn, die da Benutza in den Benutza-Eistellunga eigstellt håt. Gleichzeitig ko mittels Formula a andere Språchn ausgewählt und ozoagt werdn. | |desc-bar=De Vorlåg erlaubt des Schreibn eina Beschreibung in mehreren Språchn, um dann nur die Beschreibung in dea Sprachn einblendn zu lassn, die da Benutza in den Benutza-Eistellunga eigstellt håt. Gleichzeitig ko mittels Formula a andere Språchn ausgewählt und ozoagt werdn. | ||
|desc-be-tarask=Гэты шаблён дазваляе Вам дадаваць апісаньні рознымі мовамі і адлюстроўваць толькі тыя варыянты, якія абраныя ў наладах карыстальніка. Таксама ён дае магчымасьць абраць пэўную мову праз форму. | |desc-be-tarask=Гэты шаблён дазваляе Вам дадаваць апісаньні рознымі мовамі і адлюстроўваць толькі тыя варыянты, якія абраныя ў наладах карыстальніка. Таксама ён дае магчымасьць абраць пэўную мову праз форму. | ||
| Line 14: | Line 14: | ||
|desc-fr=Permet de spécifier une description en plusieurs langues, de n’afficher que celle choisie par l’utilisateur tout en permettant d’accéder aux autres via un formulaire. | |desc-fr=Permet de spécifier une description en plusieurs langues, de n’afficher que celle choisie par l’utilisateur tout en permettant d’accéder aux autres via un formulaire. | ||
|desc-ja=複数の言語を利用して、説明を書いたり、ユーザの母国語で表示したり、フォームを利用している外のユーザの記事を読んだり、できるようになります。 | |desc-ja=複数の言語を利用して、説明を書いたり、ユーザの母国語で表示したり、フォームを利用している外のユーザの記事を読んだり、できるようになります。 | ||
|desc-ko=이 틀을 사용하면 여러 언어로 설명을 작성하고 사용자 기본 설정에 설정된 언어만 표시할 수 있습니다. 또한 펼치기 양식을 사용하여 다른 언어를 선택하여 표시할 수도 있습니다. | |||
|desc-mk=Овозможува ставање опис на повеќе јазици, со тоа што на корисникот ќе му се прикаже само описот на претпочитаниот јазик во нагодувањата. | |desc-mk=Овозможува ставање опис на повеќе јазици, со тоа што на корисникот ќе му се прикаже само описот на претпочитаниот јазик во нагодувањата. | ||
|desc-pt-br=Permite especificar uma descrição em diferentes idiomas, para exibir somente aquela definida nas preferências do usuário. Também permite selecionar e exibir um idioma diferente a partir de um formulário. | |desc-pt-br=Permite especificar uma descrição em diferentes idiomas, para exibir somente aquela definida nas preferências do usuário. Também permite selecionar e exibir um idioma diferente a partir de um formulário. | ||
| Line 30: | Line 31: | ||
|1d-fr=<code>xx</code> peut être tout code de langue, autant de fois que nécessaire | |1d-fr=<code>xx</code> peut être tout code de langue, autant de fois que nécessaire | ||
|1d-ja=<code>xx</code> はサポートされている言語の数字です。 | |1d-ja=<code>xx</code> はサポートされている言語の数字です。 | ||
|1d-ko=<code>xx</code> 지원되는 모든 언어 코드를 사용할 수 있습니다. | |||
|1d-mk=<code>xx</code> можат да бидат било кои поддржани јазични кодови | |1d-mk=<code>xx</code> можат да бидат било кои поддржани јазични кодови | ||
|1d-pt-br=<code>xx</code> pode ser qualquer número ou qualquer código de idioma suportado | |1d-pt-br=<code>xx</code> pode ser qualquer número ou qualquer código de idioma suportado | ||
| Line 47: | Line 49: | ||
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 {{tl|en}}, {{tl|fr}} and {{tl|es}}. However, if the text and the corresponding language code to display (for example, "en") is not listed in the template, all of the other languages listed in the template will be displayed instead, by default. | 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 {{tl|en}}, {{tl|fr}} and {{tl|es}}. However, if the text and the corresponding language code to display (for example, "en") is not listed in the template, all of the other languages listed in the template will be displayed instead, by default. | ||
|ko=양식 선택 및 언어 접기를 생성하려면 JavaScript가 필요합니다. 이 JavaScript는 위키미디어 공용의 기본 gadget, 즉 “''언어 선택''”으로 구현되어 있으며 [[Special:Preferences#mw-prefsection-gadgets|환경설정을 수정]]하여 끌 수 있습니다. | |||
이 gadget은 {{tl|en}}, {{tl|fr}}, {{tl|es}}와 같은 언어 틀을 사용하여 문서에 임계값 이상의 언어가 연속적으로 작성된 경우 여러 언어로 된 설명을 접고 양식 선택을 생성합니다. 그러나 표시할 문자와 해당 언어 코드(예: en)가 틀에 나열되어 있지 않으면 기본적으로 틀에 나열된 다른 모든 언어가 대신 표시됩니다. | |||
|be-tarask=Дзеля стварэньня выпадаючага сьпісу моваў і адлюстраваньня толькі патрэбных моваў неабходны JavaScript. Гэты JavaScript убудаваны ў ВікіСховішчы як дапомны гаджэт пад назовам «''Language select''» і можа быць выключаны [[Special:Preferences#mw-prefsection-gadgets|зьмяненьнем наладаў]]. <small>({{ActivateGadget |name= LanguageSelect }} // {{DeactivateGadget |name= LanguageSelect }})</small> | |be-tarask=Дзеля стварэньня выпадаючага сьпісу моваў і адлюстраваньня толькі патрэбных моваў неабходны JavaScript. Гэты JavaScript убудаваны ў ВікіСховішчы як дапомны гаджэт пад назовам «''Language select''» і можа быць выключаны [[Special:Preferences#mw-prefsection-gadgets|зьмяненьнем наладаў]]. <small>({{ActivateGadget |name= LanguageSelect }} // {{DeactivateGadget |name= LanguageSelect }})</small> | ||
| Line 83: | Line 89: | ||
| it = Testo '''italiano'''. Se il testo corrispondente alla lingua scelta non è disponibile, tutte le lingue saranno mostrate di default. | | it = Testo '''italiano'''. Se il testo corrispondente alla lingua scelta non è disponibile, tutte le lingue saranno mostrate di default. | ||
| ja = 日本語の文字。もし選択した言語に対応したテキストが正しく表示されない場合、デフォルトで全ての言語で表示されます。 | | ja = 日本語の文字。もし選択した言語に対応したテキストが正しく表示されない場合、デフォルトで全ての言語で表示されます。 | ||
| ko = '''한국어''' 문자의 경우 나타나도록 고른 언어에 해당하는 문자를 사용할 수 없는 경우 기본적으로 모든 언어가 표시됩니다. | |||
| mk = Текст на '''македонски'''. Ако нема текст што соодветствува на одбраниот јазик, тогаш по основно ќе се прикажат сите јазици. | | mk = Текст на '''македонски'''. Ако нема текст што соодветствува на одбраниот јазик, тогаш по основно ќе се прикажат сите јазици. | ||
| pt = Texto em '''português'''. | | pt = Texto em '''português'''. | ||
| Line 102: | Line 109: | ||
| it = produce: | | it = produce: | ||
| ja = 以下のように表示されます | | ja = 以下のように表示されます | ||
| ko = 출력: | |||
| mk = дава: | | mk = дава: | ||
| pt = produz: | | pt = produz: | ||
| Line 120: | Line 128: | ||
| it = Testo '''italiano'''. Se il testo corrispondente alla lingua scelta non è disponibile, tutte le lingue saranno mostrate di default. | | it = Testo '''italiano'''. Se il testo corrispondente alla lingua scelta non è disponibile, tutte le lingue saranno mostrate di default. | ||
| ja = 日本語の文字。もし選択した言語に対応したテキストが正しく表示されない場合、デフォルトで全ての言語で表示されます。 | | ja = 日本語の文字。もし選択した言語に対応したテキストが正しく表示されない場合、デフォルトで全ての言語で表示されます。 | ||
| ko = '''한국어''' 문자의 경우 나타나도록 고른 언어에 해당하는 문자를 사용할 수 없는 경우 기본적으로 모든 언어가 표시됩니다. | |||
| mk = Текст на '''македонски'''. Ако нема текст што соодветствува на одбраниот јазик, тогаш по основно ќе се прикажат сите јазици. | | mk = Текст на '''македонски'''. Ако нема текст што соодветствува на одбраниот јазик, тогаш по основно ќе се прикажат сите јазици. | ||
| pt = Texto em '''português'''. | | pt = Texto em '''português'''. | ||
Latest revision as of 16:55, 7 March 2025

This template allows you to write descriptions in different languages, and to display only the one that is set in the user preferences. It also allows you to select and display a different language using a drop-down form.
Usage
{{Multilingual description |xx= }}
Or use the shorthand
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}} and {{Es}}. However, if the text and the corresponding language code to display (for example, "en") is not listed in the template, all of the other languages listed in the template will be displayed instead, by default.
| I18n templates: | {{Multilingual description|lang= |de,en,default=Deutsch/English |fr=français |... }} |
{{de|Deutsch}} {{en|English}} {{fr|français}} ... |
{{LangSwitch|lang= |de,en,default=Deutsch/English |fr=français |... }} |
{{Autotranslate}} | {{TNT}} |
|---|---|---|---|---|---|
| Recommended use at | Categories, galleries | File description pages (deprecated, can be safely replaced by {{Multilingual description}}) | Small templates, whenever the previous options are not suitable (removes the visual indication of the language before each translated text) | Data tables with translated cells or 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
|
Data tables with translated cells or larger templates, when used on pages that do have language subpages; most of the time these will be pages prepared with the Translate Extension |
| Requires JavaScript enabled for folding | Yes | No | |||
| Folding can be disabled by user | Yes | No | |||
| Folding is done server-side | No | Yes | |||
| Folding when at least n languages are provided | 1 (all translations are shown without folding if the preferred language selected by the user has no matching translation) | 4 | 1 | ||
| Detection of duplicate, incorrect, or unsupported language codes | Yes | No | Yes | ||
| Allows the same translation to be used for several languages | Yes | No | Yes | ||
| Supports language fallbacks | No | Yes | No | Yes | |
| Collation order of languages (when not folded) | Consistent order by native language name, languages grouped by script:
|
As provided by the user in the wikitext (any inconsistent order may be difficult to lookup visually) | N/A | ||
| Search indexing issues | No (all translations are included on the same page, however search results may be less relevant with many languages mixed) | Yes (may not index all languages depending on search engines, unless there's a list of links for visiting other languages) | Partially (where used; language subpages of templates are indexed) | No (translated pages should include a <languages/> navigation bar for visiting other languages)
| |
| Page size issues | Yes (may exhaust size or time limits in the wiki parser if many languages are included; larger pages to download for all visitors; slower navigation for visitors with slow Internet access; may be costly for visitors with limited data plans) | No (only the content for the selected language or a suitable fallback language is present in the generated page) | |||
| Contains expensive parser functions | No | Yes (unless there's an editable /lang subpage listing all the existing translations selected with a {{LangSwitch}})
| |||
Template parameters
| Parameter | Description | Default | Status | |
|---|---|---|---|---|
xx | xx can be any number of any supported language codes | empty | optional | |
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
Placement: At the top of the page
Relies on:
- MediaWiki:Gadget-LanguageSelect.js
- Module:Multilingual description
- Module:Multilingual description/sort
See also
Localization
This template is not intended to be localized.
Example
{{Multilingual description
| be-tarask = '''Беларускі''' тэкст. Калі няма тэксту на адпаведнай мове, дапомна будуць адлюстраваныя тэксты на ўсіх мовах.
| ca = texto en '''català'''.
| cs = Text v '''češtině'''.
| 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'''. Se il testo corrispondente alla lingua scelta non è disponibile, tutte le lingue saranno mostrate di default.
| ja = 日本語の文字。もし選択した言語に対応したテキストが正しく表示されない場合、デフォルトで全ての言語で表示されます。
| ko = '''한국어''' 문자의 경우 나타나도록 고른 언어에 해당하는 문자를 사용할 수 없는 경우 기본적으로 모든 언어가 표시됩니다.
| 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 = '''Русский''' текст.
| uk = '''Український''' текст. Якщо немає тексту на відповідній мові, за замочуванням будуть відображені тексти на всіх мовах.
| zh = '''中文'''文本,如果選擇顯示的語言對應的文本不可用,則默認顯示所有語言。
}}
produces: