Jump to content

Module:Engvar/doc: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
No edit summary
No edit summary
Line 1: Line 1:
This module is allows an article to show a '''national variant of English''' ([[WP:ENGVAR]]) in templates, depending on the individual article preference. See also {{tl|Engvar}}.
This module is allows an article to show a '''national variant of English''' ([[WP:ENGVAR]]) in templates, depending on the individual article preference. Basically, the article page infobox can have {{para|engvar|en-GB}} set to show en-GB spellng.


For example, a single template can show "football" text in en-UK articles, and "soccer" in en-US articles.
For example, a single template can show "football" text in en-UK articles, and "soccer" in en-US articles.


== Usage ==
==Usage==
See {{tl|Engvar}}.
See {{tl|Engvar}}.


Line 45: Line 45:


==List of variant languages==
==List of variant languages==
In the ''template code'' only use the listed ISO-code as parameter name: {{para|en-UK|vapour}}. The ''article editor'' has freedom to use the other options: {{para|engvar|British}}.
In the ''template code'' only use the listed ISO-code as parameter name: {{para|en-UK|vapour}}. The ''article editor'' has freedom to use the other options: {{para|engvar|British}}.


{| class="wikitable sortable collapsible uncollapsed" style="min-width:50%;"
{| class="wikitable sortable collapsible uncollapsed" style="min-width:50%;"

Revision as of 20:35, 6 July 2016

This module is allows an article to show a national variant of English (WP:ENGVAR) in templates, depending on the individual article preference. Basically, the article page infobox can have |engvar=en-GB set to show en-GB spellng.

For example, a single template can show "football" text in en-UK articles, and "soccer" in en-US articles.

Usage

See {{Engvar}}.

{{#invoke:variants|
| defaultWord =
| engvar = {{{engvar|}}}<!-- Pass through article setting -->
| defaultLang =
| en-XX = <!-- Add country code for XX, and its word  -->
| en-YY = <!-- Add more variants as might be needed -->
| engvarCat = {{{engvarCat|}}}
| engvarCatSort =
}}
|engvar=

This input (user input) is checked against a list of possible words ("en-US, American English, United States"). Internal identifier is the code like "en-US".

|engvarCatSort=

Sort text for maintenance category. Advise to set to project name like "rainbow" not "infobox rainbow" (all templates will fill this category!). Default is pagename.

Maintenance category

Parameter list

In the

| defaultWord =
| defaultLang =
| engvar = {{{engvar|}}}<!-- Pass through the editor's choice -->
| en-XX = <!-- add country code for XX, and the nation language word -->
| en-YY = <!-- add more variants as might be needed -->
| engvarCat = {{{engvarCat|}}} <!-- yes/no; '=no' will suppress message category in article page) -->

In the parameter list, for the editor to see & use:

| engvar =
| engvarCat =

List of variant languages

In the template code only use the listed ISO-code as parameter name: |en-UK=vapour. The article editor has freedom to use the other options: |engvar=British.

Language ISO-code
American English en-US
Australian English en-AU
British English en-GB
Canadian English en-CA
Hiberno-English (Irish-English) en-EI
Hong Kong English en-HK
Indian English en-IN
Jamaican English en-JM
Malawian English en-MW
New Zealand English en-NZ
Nigerian English en-NG
Pakistani English en-PK
Philippine English en-PH
Scottish English en-SCO
Singapore English en-SG
South African English en-ZA
Trinidadian English en-TT
British English Oxford spelling
British (Oxford) English
Oxford English Dictionary (OED)
en-OED
IUPAC spelling en-IUPAC