Template:Otheruses: Difference between revisions
More actions
m "For X/For other meanings": fix in Japanese (should be outside the condition) |
m use FULLPAGENAME (with the namespace) instead of PAGENAME by default for the target (also cleans up leading/trailing whitespaces or leading colons in target); trim leading/trailing whitespaces in descriptions (using a dummy "#if:") |
||
| Line 131: | Line 131: | ||
|sv=handlar om | |sv=handlar om | ||
|uk=про | |uk=про | ||
}} <bdi>{{{1|<noinclude>1</noinclude>}}}</bdi><!-- | }} <bdi>{{#if:||{{{1|<noinclude>1</noinclude>}}}}}</bdi><!-- | ||
The following LangSwitch is for languages placing the verb at end of the sentence (after the given topic). | The following LangSwitch is for languages placing the verb at end of the sentence (after the given topic). | ||
-->{{LangSwitch | -->{{LangSwitch | ||
| Line 162: | Line 162: | ||
|uk=Про | |uk=Про | ||
}}{{#if: {{{2|<noinclude>2</noinclude>}}} | }}{{#if: {{{2|<noinclude>2</noinclude>}}} | ||
|  <bdi>{{{2|<noinclude>2</noinclude>}}}</bdi> | |  <bdi>{{#if:||{{{2|<noinclude>2</noinclude>}}}}}</bdi> | ||
| {{LangSwitch | | {{LangSwitch | ||
|bn= অন্য ব্যবহার | |bn= অন্য ব্যবহার | ||
| Line 206: | Line 206: | ||
|sv=se | |sv=se | ||
|uk=див. | |uk=див. | ||
}} '''<bdi>[[{{{3|{{ | }} '''<bdi>[[:{{FULLPAGENAME:{{{3|{{FULLPAGENAME}} (disambiguation)}}}}}]]</bdi>'''{{LangSwitch | ||
|en=~ | |en=~ | ||
|ja=を参照してください | |ja=を参照してください | ||
| Line 232: | Line 232: | ||
|sv=för | |sv=för | ||
|uk=про | |uk=про | ||
}} <bdi>{{{4|<noinclude>4</noinclude>}}}</bdi>{{LangSwitch | }} <bdi>{{#if:||{{{4|<noinclude>4</noinclude>}}}}}</bdi>{{LangSwitch | ||
|en=~ | |en=~ | ||
|ja=については | |ja=については | ||
| Line 255: | Line 255: | ||
|sv=se | |sv=se | ||
|uk=див. | |uk=див. | ||
}} '''<bdi>[[{{{5|{{ | }} '''<bdi>[[:{{FULLPAGENAME:{{{5|{{FULLPAGENAME}} (disambiguation)}}}}}]]</bdi>'''{{LangSwitch | ||
|en=~ | |en=~ | ||
|ja=を参照してください | |ja=を参照してください | ||
| Line 282: | Line 282: | ||
|sv=för | |sv=för | ||
|uk=про | |uk=про | ||
}} <bdi>{{{6|<noinclude>6</noinclude>}}}<bdi>{{LangSwitch | }} <bdi>{{#if:||{{{6|<noinclude>6</noinclude>}}}}}<bdi>{{LangSwitch | ||
|en=~ | |en=~ | ||
|ja=については | |ja=については | ||
| Line 305: | Line 305: | ||
|sv=se | |sv=se | ||
|uk=див. | |uk=див. | ||
}} '''<bdi>[[{{{7|{{ | }} '''<bdi>[[:{{FULLPAGENAME:{{{7|{{FULLPAGENAME}} (disambiguation)}}}}}]]</bdi>'''{{LangSwitch | ||
|en=~ | |en=~ | ||
|ja=を参照してください | |ja=を参照してください | ||
| Line 332: | Line 332: | ||
|sv=för | |sv=för | ||
|uk=про | |uk=про | ||
}} <bdi>{{{8|<noinclude>8</noinclude>}}}</bdi>{{LangSwitch | }} <bdi>{{#if:||{{{8|<noinclude>8</noinclude>}}}}}</bdi>{{LangSwitch | ||
|en=~ | |en=~ | ||
|ja=については | |ja=については | ||
| Line 355: | Line 355: | ||
|sv=se | |sv=se | ||
|uk=див. | |uk=див. | ||
}} '''<bdi>[[{{{9|{{ | }} '''<bdi>[[:{{FULLPAGENAME:{{{9|{{FULLPAGENAME}} (disambiguation)}}}}}]]</bdi>'''{{LangSwitch | ||
|en=~ | |en=~ | ||
|ja=を参照してください | |ja=を参照してください | ||
| Line 382: | Line 382: | ||
|sv=för | |sv=för | ||
|uk=про | |uk=про | ||
}} <bdi>{{{10|<noinclude>10</noinclude>}}}</bdi>{{LangSwitch | }} <bdi>{{#if:||{{{10|<noinclude>10</noinclude>}}}}}</bdi>{{LangSwitch | ||
|en=~ | |en=~ | ||
|ja=については | |ja=については | ||
| Line 405: | Line 405: | ||
|sv=se | |sv=se | ||
|uk=див. | |uk=див. | ||
}} '''<bdi>[[{{{11|{{ | }} '''<bdi>[[:{{FULLPAGENAME:{{{11|{{FULLPAGENAME}} (disambiguation)}}}}}]]</bdi>'''{{LangSwitch | ||
|en=~ | |en=~ | ||
|ja=を参照してください | |ja=を参照してください | ||
Revision as of 16:14, 25 August 2021
Template is used for linking the reader to articles with similar titles or concepts that they may have been seeking instead.
Usage
{{Otheruses |1= |2= |3= }}
You can add several pairs (of description and link) for multiple other usages (currently up to 5 pairs).
- Each provided description (in parameter 1 for the use in the current page, and in parameters 2, 4, 6... for other uses) can be autotranslated using {{LangSwitch}}.
- If you do not give the description for the first link, it will display “other uses” by default – you may specify description (without leading “for” and ending “see”).
- For descriptions of the 2nd (or further) other usage, you must supply this distinctive description.
- If you do not give the name of the other page (in parameters 3, 5, 7, ...), it automatically targets a disambiguation page, i.e. the full name of the current page with an appended “ (disambiguation)” suffix. You should specify the explicit name of each other page except one of them.
Basic usage
{{Otheruses}}
gives:
Translating the descriptions
The descriptions themselves will not be correct in the generated sentence, even if the template translates some fixed parts. You can autotranslate the provided descriptions for example with {{LangSwitch}}:
First,
{{Otheruses|the insect}}
gives:
but:
{{Otheruses
| {{LangSwitch |en=the insect |fr=l’insecte |sl=žuželki}}
}}
gives:
As well,
{{Otheruses|the insect group|the automobile|Volkswagen Beetle}}
gives:
but:
{{Otheruses
| {{LangSwitch |en=the insect group |fr=le groupe d’insectes |sl=skupini žuželk}}
| {{LangSwitch |en=the automobile |fr=l’automobile |sl=avtomobil}} | Volkswagen Beetle
}}
gives:
Linking to disambiguation categories or files
You also may direct to categories (a leading ":", normally needed for links to categories or files may be specified, but it is now detected and supplied automatically).
So,
{{Otheruses|||Category:Bugs}}
gives:
As well,
{{Otheruses
| {{LangSwitch |en=wells for water supply |fr=les puits fournissant de l’eau |sl=vodnjakih za oskrbo z vodo}}
| {{LangSwitch |en=the town in England |fr=la petite ville en Angleterre |sl=mesto v Angliji}} | Category:Wells, England
}}
gives:
Template parameters
| Parameter | Description | Default | Status | |
|---|---|---|---|---|
description | Leading description sentence (useful when parameter 1 is left empty or not specified, as you must replace the first generated sentence, or when you want to set a prior notice); don't include the ending punctuation which is generated. | empty | optional | |
1 | Description of this page | empty | optional | |
2 | Description of the other page | other uses | optional | |
3 | Full name (link) of the other page (with its namespace name) | {{FULLPAGENAME}} (disambiguation) | optional | |
4 | Description of a 2nd other page (for an examplar specific topic) | empty | optional | |
5 | Full name (link) of the 2nd other page (with its namespace name); if you set this parameter, you must also set the previous parameter with an explicit description | empty | optional | |
6 | Description of a 3nd other page (like with parameter 4) | empty | optional | |
7 | Full name (link) of the 3rd other page (like with parameter 5) | empty | optional | |
8 | Description of a 4th other page (like with parameter 4) | empty | optional | |
9 | Full name (link) of the 4th other page (like with parameter 5) | empty | optional | |
10 | Description of a 5th other page (like with parameter 4) | empty | optional | |
11 | Full name (link) of the 5rd other page (like with parameter 5) | empty | optional | |
|
<templatedata>JSON</templatedata> ./. {{TemplateBox}}
TemplateData is a way to store information about template parameters (the description of those and of the whole template) for both humans and machines. It is used by VisualEditor and possibly other tools like Upload Wizard. Existing template documentation Newly created template documentation and imports Wikipedia's help about TemplateData • Commons-specific information Template is used for linking the reader to articles with similar titles or concepts that they may have been seeking instead.
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
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:
Template:LangSwitch, Template:Comma, Template:Semicolon, Template:Full stop
Localization
To add your language to the list of languages supported by this template, please edit the template and add a row to the "{{LangSwitch|}}" construct. It takes the form "|xx= Your translation " (xx being the code of your language)