Template:LanguageSelector/link: Difference between revisions
Template page
More actions
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
{{#if: {{{1|}}} | {{#if: {{{1|}}} | ||
| {{#switch: {{lc:{{{2|}}}}} | | <span id="LanguageSelector-{{lc:{{{1|}}}}}-{{#switch: {{lc:{{{2|}}}}} | ||
|#default = {{UselangLink | |only = {{#if: {{{3|}}} | Icon | Code }} | ||
|code = {{#if: {{{3|}}} | Icon }}Code | |||
| | |yes|y|1 = {{#if: {{{3|}}} | Icon }}Name | ||
|#default = Name | |||
}}" class="plainlinks">[{{UselangLink|bare=1|1={{lc:{{{1|}}}}}|action={{{action|}}}}} {{#switch: | |||
{{#switch: {{lc:{{{2|}}}}} | |||
|only = {{#if: {{{3|}}} | i | c }} | |||
|code = {{#if: {{{3|}}} | i }}c | |||
|yes|y|1 = {{#if: {{{3|}}} | i }}n | |||
|#default = n | |||
}} | }} | ||
| | |n = <span lang="{{Int:Lang}}" title="{{#language:{{lc:{{{1|}}}}}|{{Int:Lang}}}}"><bdi lang="{{lc:{{{1|}}}}}">{{#language:{{lc:{{{1|}}}}}}}</bdi></span> | ||
|in = <span lang="{{Int:Lang}}" title="{{#language:{{lc:{{{1|}}}}}|{{Int:Lang}}}}"><bdi lang="{{lc:{{{1|}}}}}">[[File:{{{3|}}}|x14px|link=|alt={{#language:{{lc:{{{1|}}}}}}}]]</bdi> <bdi lang="{{lc:{{{1|}}}}}">{{#language:{{lc:{{{1|}}}}}}}</bdi></span> | |||
|i = <span lang="{{Int:Lang}}" title="{{#language:{{lc:{{{1|}}}}}|{{Int:Lang}}}}"><bdi lang="{{lc:{{{1|}}}}}">[[File:{{{3|}}}|x14px|link=|alt={{#language:{{lc:{{{1|}}}}}}}]]</bdi></span> | |||
|c = <small style="font-size:88%" lang="{{Int:Lang}}" title="{{#language:{{lc:{{{1|}}}}}|{{Int:Lang}}}}">[<tt>{{lc:{{{1|}}}}}</tt>]</small> | |||
|ic = <small style="font-size:88%" lang="{{Int:Lang}}" title="{{#language:{{lc:{{{1|}}}}}|{{Int:Lang}}}}"><bdi lang="{{lc:{{{1|}}}}}">[[File:{{{3|}}}|x14px|link=|alt={{#language:{{lc:{{{1|}}}}}}}]]</bdi> [<tt>{{lc:{{{1|}}}}}</tt>]</small> | |||
}}]</span> | |||
}} | |||
}}<noinclude>{{Documentation}}</noinclude><noinclude> | }}<noinclude>{{Documentation}}</noinclude><noinclude> | ||
[[Category:Miscellaneous subtemplates]] | [[Category:Miscellaneous subtemplates]] | ||
</noinclude> | </noinclude> | ||
Revision as of 00:10, 13 July 2020
This documentation is transcluded from Template:LanguageSelector/link/doc.
Displays a link to the current page in displayed in another specified language.
Usage
{{LanguageSelector/link |1= |2= |3= |action= }}
Template parameters
| Parameter | Description | Default | Status | |
|---|---|---|---|---|
1 | language code, required to display any actual link | empty | optional | |
2 | what to display within the link:
| empty | optional | |
3 | icon file name (required when parameter 2 is yes or only) | empty | optional | |
action | optional action (such as "edit") to include in the target URL. Passed through to {{UselangLink}} | empty | 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:
{{UselangLink}}
Examples
| Code | Renders as |
|---|---|
"{{LanguageSelector/link|fr}}"
|
"français" |
"{{LanguageSelector/link|fr|code}}"
|
"[fr]" |
"{{LanguageSelector/link|fr|yes|Flag of La Francophonie.svg}}"
|
" |
"{{LanguageSelector/link|fr|only|Flag of La Francophonie.svg}}"
|
" |
"{{LanguageSelector/link}}"
|
"" |