Open main menu

Changes

Link to language articles with non-standard titles, e.g. Ligurian in the documentation of Template:lij icon
__NOEDITSECTION__
{{lowercase title}}
<!--NOTE: This template is used as documentation for multiple language icon templates in Category:Language icon templates-->

'''<nowiki>{{</nowiki>{{lcfirst:{{BASEPAGENAME}}}}<nowiki>}}</nowiki>''' is a template usually used to indicate to readers that an external link is in a {{
#ifeq: {{str rightc|{{BASEPAGENAME}}|4}} | icon
| foreign language ({{#invoke:Lang|name_from_code|{{lcfirst:{{str crop|{{BASEPAGENAME}}|5}}}}|link=yes}}{{
#if: {{{cat-lang|}}}
| &#32;or [[{{{cat-lang}}} language|{{{cat-lang}}}]]
}});
| foreign language;
}} no parameters are needed.

It should generally be placed after the external link, although this is not set in stone. For more information, see [[Wikipedia:Manual of Style (links)#Non-English-language sites|the Manual of Style]].

The template uses the {{tlxb|Link language|{{
#ifeq: {{str rightc|{{BASEPAGENAME}}|4}} | icon
| {{lcfirst:{{str crop|{{BASEPAGENAME}}|5}}}}
| xx
}}}} format, but is shortened by simply having the name <code><nowiki>{{</nowiki>{{
#ifeq: {{str rightc|{{BASEPAGENAME}}|4}} | icon
| {{lcfirst:{{BASEPAGENAME}}}}
| xx icon
}}<nowiki>}}</nowiki></code>, where <code>{{
#ifeq: {{str rightc|{{BASEPAGENAME}}|4}} | icon
| {{lcfirst:{{str crop|{{BASEPAGENAME}}|5}}}}
| xx
}}</code> represents the {{
#ifeq:{{str len|{{str crop|{{BASEPAGENAME}}|5}}}}|2
| [[ISO 639-1]]
}}{{
#ifeq:{{str len|{{str crop|{{BASEPAGENAME}}|5}}}}|3
| [[ISO 639-2]] or [[ISO 639-3]]
}} language code. Please be aware that [[language code]]s do not always coincide with<!-- /are not always the same as --> [[country code]]s (see the list of [[ISO 3166-1]] codes).

For citations, use the {{para|language}} parameter of the various citation templates: {{tlx|cite web}}, {{tlx|cite news}}, {{tlx|cite journal}}, etc.

[[:Category:Language icon templates]] contains a full list of the templates that can be used.
{{#if: {{{addendum|}}}
| <div id="addendum">
{{{addendum}}}<!-- start on new line in case text starts with ==Heading== -->
</div>
}}
==User-defined CSS==
Logged in users can change the appearance of the template's output using [[CSS]] with the <code>languageicon</code> class. For example, edit [[Special:MyPage/common.css]] and add {{code|lang=css|span.languageicon { font-weight: bold; }<nowiki />}}. That would result in {{tld|{{
#ifeq: {{str rightc|{{BASEPAGENAME}}|4}} | icon
| {{lcfirst:{{BASEPAGENAME}}}}
| fr icon
}}}} being displayed as <span style="font-weight: bold;">(in {{#invoke:Lang|name_from_code|{{
#ifeq: {{str rightc|{{BASEPAGENAME}}|4}} | icon
| {{lcfirst:{{str crop|{{BASEPAGENAME}}|5}}}}
| fr
}}}})</span> instead of (in {{#invoke:Lang|name_from_code|{{
#ifeq: {{str rightc|{{BASEPAGENAME}}|4}} | icon
| {{lcfirst:{{str crop|{{BASEPAGENAME}}|5}}}}
| fr
}}}}).
{{#ifexist: Category:Articles with {{
#if: {{{cat-lang|}}}
| {{{cat-lang}}}
| {{#invoke:Lang|name_from_code|{{lcfirst:{{str crop|{{BASEPAGENAME}}|5}}}}}}
}}-language external links
|
==Category added to articles==
Articles using '''<nowiki>{{</nowiki>{{lcfirst:{{BASEPAGENAME}}}}<nowiki>}}</nowiki>''' are automatically added
to {{clc|Articles with {{
#if: {{{cat-lang|}}}
| {{{cat-lang}}}
| {{#invoke:Lang|name_from_code|{{lcfirst:{{str crop|{{BASEPAGENAME}}|5}}}}}}
}}-language external links}}.
}}
==Supporting templates==
* {{tl|Link language}}

==See also==
{{#ifexist: Template:Lang-{{lcfirst:{{str crop|{{BASEPAGENAME}}|5}}}}
|
* {{tl|Lang-{{lcfirst:{{str crop|{{BASEPAGENAME}}|5}}}}}}
}}
* {{tl|Lang}}, and its opposite, {{tl|Language with name/for}}
* [[List of ISO 639-1 codes]], [[List of ISO 639-2 codes]], and [[List of ISO 639-3 codes]]
{{#ifeq: {{str len|{{str crop|{{BASEPAGENAME}}|5}}}} | 2
|
== External links ==
* {{cite web |url=http://www.loc.gov/standards/iso639-2/php/langcodes_name.php?iso_639_1={{lcfirst:{{str crop|{{BASEPAGENAME}}|5}}}} |title=ISO 639-1 identifier: {{lcfirst:{{str crop|{{BASEPAGENAME}}|5}}}} |website=Library of Congress}}
}}{{
#ifeq: {{str len|{{str crop|{{BASEPAGENAME}}|5}}}} | 3
|
== External links ==
* {{cite web |url=http://www-01.sil.org/iso639-3/documentation.asp?id={{lcfirst:{{str crop|{{BASEPAGENAME}}|5}}}} |title=ISO 639-3 identifier: {{lcfirst:{{str crop|{{BASEPAGENAME}}|5}}}} |website=SIL International}}
}}<includeonly>{{When on basepage|
<!-- Categories added to templates which transclude this documentation file -->
[[Category:Language icon templates|{{lcfirst:{{str crop|{{BASEPAGENAME}}|5}}}}}}]]{{
#ifexist: ISO 639:{{lcfirst:{{str crop|{{BASEPAGENAME}}|5}}}}
| <!-- no action if language code has an ISO 639 redirect -->
| [[Category:Language icon templates with other than ISO 639]]
}}{{
#switch: {{lcfirst:{{str crop|{{BASEPAGENAME}}|5}}}}
<!-- reserved ISO 639 codes, not used for a specific country -->
| mis | mul | und | zxx = [[Category:Language icon templates with other than ISO 639]]
}}{{
#if: {{Str len|{{BASEPAGENAME}}}} = 8 <!-- minus 5 for " icon" leaves 3 for character code -->
| {{
#switch: {{lcfirst:{{str left|{{BASEPAGENAME}}|2}}}}
<!-- reserved ISO 639 codes, qaa - qtz are for local use -->
| qa | qb | qc | qd | qe | qf | qg | qh | qi | qj | qk | ql | qm | qn | qo | qp | qq | qr | qs
| qt = [[Category:Language icon templates with other than ISO 639]]
}}
}}{{
#ifexist: Category:Articles with {{#invoke:Lang|name_from_code|{{lcfirst:{{str crop|{{BASEPAGENAME}}|5}}}}}}-language external links
| [[Category:Templates that add a tracking category]]
}}
}}</includeonly><noinclude>
{{Documentation}}<!-- PLEASE ADD THIS TEMPLATE'S CATEGORIES TO THE /doc SUBPAGE, THANKS -->
</noinclude>
Anonymous user