![]() | Template:Engvar is permanently protected from editing because it is a heavily used or highly visible template. Substantial changes should first be proposed and discussed here on this page. If the proposal is uncontroversial or has been discussed and is supported by consensus, editors may use {{edit template-protected}} to notify an administrator or template editor to make the requested edit. Usually, any contributor may edit the template's documentation to add usage notes or categories.
Any contributor may edit the template's sandbox. Functionality of the template can be checked using test cases. |
![]() | This template does not require a rating on Wikipedia's content assessment scale. It is of interest to the following WikiProjects: | |||||||
|
![]() | This template was considered for deletion on 2017 May 28. The result of the discussion was "snow keep". |
This template and anything related to it need to use standard, predictable, memorable ISO language codes, like en-GB and en-AU, not made-up fake ones like en-UK and en-AUS. People should not have to memorize non-standard variances to get templates to work. I tried to just fix this, but someone reported that it broke something, so there appears to be a dependency somewhere. All that should be needed is to make en-gb and en-au (after they've been lower-cased by a parserfuction) be the real parameter names, with en-uk and en-aus aliases for them respectively (e.g. {{{en-gb|{{{en-uk}}}}}}
). I thought I'd done that, but it was dark:30 and I must have erred. — SMcCandlish ☺ ☏ ¢ ≽ʌⱷ҅ᴥⱷʌ≼ 06:43, 7 November 2014 (UTC)
Template rebuilded from scratch. Proposed future documentation:
|engvar=
that can be set |engvar=en-us
or |engvar=en-uk
in any article. The template has a default variety set.|label1={{engvar|vapor |en-uk=vapour}}
(here, the en-us word is the default){{example|engvar=en-uk |otherdata=...}}
→ shows the word vapour
."|engvar=
setting is only required to alter from that default.|engvar=en-sa
and the template shows the en-uk word by rule). Or is this per word? In that case, the template:example code should be: {{engvar|engvar=en-uk}} (we need a better example for this, a three- or four-variety situation)en-UK
, not en-GB
(see ISO 3166-1 alpha-2). The template will recognise both though, because this helps the editor. -DePiep (talk) 14:13, 16 November 2014 (UTC)
Even if the template accepts "en-UK", "en-AUS", "en-CAN" as legacy input, it should use as the actual parameter, output, and documented codes "en-GB", "en-AU", and "en-CA" as they're the proper ISO 3166-1 alpha-2 codes. Other valid values are en-US, en-NZ and (if we wanted to get that fine-grained) "en-ZA" for South Africa, "en-IE" for Ireland, "en-IN" for India, "en-HK" for Hong Kong, "en-SG" for Singapore, "en-BZ" for Belize, etc. I would definitely include at least US, UK, CA, AU, NZ, ZA, HK, and IE at a minimum. In theory, we should accept a value for any country where English is an official language. After handling ISO 3166-1's proper codes, it wouldn't hurt to also support formally ISO-reserved alternatives (I think "UK" is the only one for a country in which English is a major language), as well as (also common but incorrect in the context) three-letter ISO 3166-1 alpha-3 country codes like "USA", "GBR", "CAN", "AUS", because of their familiarity and due to the paucity of people who understand the difference between usage of these codes. Probably even add support for IOC and FIFA three-letter country codes in the rare cases they differ from the ISO ones, because they're actually more familiar to many people (due to sports broadcasts) than the ISO ones. Once in a while they conflict with each other (see Comparison of IOC, FIFA, and ISO 3166 country codes), but I'm not sure this happens in any relevant cases. We shouldn't allow "en-SA" as a mistake for South Africa, as that really means Saudi Arabia.
I would proceed along this flowchart of sorts:
Then we should proceed to make sure that similar flexibility is applied to other templates that could use it, {{lang}}
, the {{lang-xx}}
templates, flag templates (they probably already have this covered, at least for three-letter codes), etc. The goal being to not make everyday editors have to memorize the difference between these coding systems; if they can figure out even one of them of it should be enough.
An argument could even be made to support the full country names as input.
I don't think we should go so far as to support sub-national codes (e.g. for Wales, Scotland, etc.), except as alternatives that output the main national code (e.g. if someone tries to use FIFA "en-WAL" or ISO_3166-2:GB's sub-national "en-WLS" for Wales, it should output "en-GB". If we go that far, the codes are: England: ENG (ISO 3166-1 alpha-3, FIFA); Northern Ireland NIR (ISO 3166-1 alpha-3, FIFA); Scotland SCT (ISO 3166-1 alpha-3) & SCO (FIFA); Wales WLS (ISO 3166-1 alpha-3) & WAL (FIFA) (Scotland), Isle of Man IM (ISO 3166-1 alpha-2), IMN (ISO 3166-1 alpha-3), GBM (ISO 3166-1 alpha-3), IOM (postal abbreviation); Jersey JE (ISO 3166-1 alpha-2), JEY (ISO 3166-1 alpha-3), & GBJ (ISO 3166-1 alpha-3); Guernsey GG (ISO 3166-1 alpha-2), GGY (ISO 3166-1 alpha-3), GBG (ISO 3166-1 alpha-3); Alderney GBA (ISO 3166-1 alpha-3). Some uncommon ISO 3166-2:GB reserved codes are EAW (England and Wales), GBN (Great Britain) and UKM (United Kingdom), but we can probably ignore them. — SMcCandlish ☺ ☏ ¢ ≽ʌⱷ҅ᴥⱷʌ≼ 00:32, 17 November 2014 (UTC)
Below is a list of Engvar id's (identification of National variants of English), as proposed base for what Engvar should recognize & use. (The list currently used live is: here).
Internal key en-[ISO, alpha-2] |
Language | en-[ISO, alpha-3] | Alt input* | Note |
---|---|---|---|---|
en-US
|
American English | en-USA
|
America*, United States*, US | |
en-AU
|
Australian English | en-AUS
|
Australia* | |
en-GB
|
British English | en-GBR
|
British*, UK, en-UK | British Oxford will yield en-OED , see below
|
en-CA
|
Canadian English | en-CAN
|
Canada* | |
en-EI
|
Hiberno-English (Irish-English) | en-IRL
|
Hiberno*, Ireland*, Irish* | |
en-HK
|
Hong Kong English | en-HKG
|
Hong Kong* | |
en-IN
|
Indian English | en-IND
|
India* | |
en-JM
|
Jamaican English | en-JAM
|
Jamaica* | |
en-MW
|
Malawian English | en-MWI
|
Malawi* | |
en-NZ
|
New Zealand English | en-NZL
|
New Zealand* | |
en-NG
|
Nigerian English | en-NGA
|
Nigeria* | |
en-PK
|
Pakistani English | en-PAK
|
Pakistan* | |
en-PH
|
Philippine English | en-PHL
|
Philippine* | |
(en-SCO )
|
Scottish English | Scottish*, Scotland* | Scots (is not en-SCO), Scotch | |
en-SG
|
Singapore English | en-SGP
|
Singapore* | |
en-ZA
|
South African English | en-ZAF
|
South Africa* | not en-SA (Saudi Arabia) |
en-TT
|
Trinidadian English | en-TTO
|
Trinidad*, Tobago* | |
(en-OED )
|
British English Oxford spelling British (Oxford) English Oxford English Dictionary (OED) |
Oxford*, OED* | So only "OED" or "Oxford" are identifying this one. | |
(en-IUPAC )
|
IUPAC spelling | en-IUPAC | ||
IUPAC spelling US | ? – seen used elsewhere; to be researched | |||
— | not English | Not identifying | ||
— | not en-SA | "SA" is Saudi-Arabia, not South Africa | ||
| ||||
|
en-[ISO 3166 alpha-2]
is used internally as the identifing Engvar name. It may be used as input. The code en-[ISO 3166 alpha-3]
and alt names may be used as input by article editors, and will be recognized & read as the identifier.-DePiep (talk) 10:20, 17 November 2014 (UTC)
en-
, country identifier, first one that exists:-our
and -re
spellings, has more in common with Pacific Northwest and Alaskan American English, than with Ontario Canadian English.)"Scots" should be a not item like SA; Scots is not a variant of English, but a closely related language like Frisian, and has its own Wikipedia. While Irish is also a separate language, no one is ever confused that it's an English variant, but they often are with Scots. The use of "Scots" to mean "Scottish" is an archaism that only survives in a few phrases like "Scots-Irish ancestry". For the same reason, we don't need to support "Scotch" as input either (only used in some stock phrases like "Scotch whisky" and "Scotch doubles tournament".).
Actually, I'd propose eliminating the Scottish/Scotland option except as an alias for en-GB. We want to avoid the implication that any little sub-national variation should have its own entry, otherwise Cornish nationalists will want Cornish English, then the Americans will expect Southern English, New Englander, West Coast English, etc., etc. If we do include any at all, I wouldn't do more than support Scotland/Scottish/SCT/SCO, Wales/Welsh/WLS/WAL, Isle of Man/Manx/IM/IOM/GBM as aliases for en-GB, and Northern Ireland/Northern Irish/NIR as aliases for en-IE. Those places are countries/nations in some but not all legal senses. An argument can be made for en-IM as its own entry, because it has its own ISO 3166 country code, but linguistically that's iffy; for WP purposes there's no difference between Manx and mainland British English, because we wouldn't be using Manx dialect words like stubbin in WP articles except to explain what they mean in context. This argument could possibly be applied to all Caribbean dialects, honestly. Not even the article Jamaica is really written in Jamaican English (much less Jamaican Patois, which WP would treat as a separate language, as it has it's own orthography).
We should probably also include NI as a not entry (it's Nicaragua, not Northern Ireland or Nigeria, and English is not an official or even large minority language there). — SMcCandlish ☺ ☏ ¢ ≽ʌⱷ҅ᴥⱷʌ≼ 20:44, 18 November 2014 (UTC)
en-QS
= Scottish Englishen-QO
= Oxford English (OED)en-QP
= IUPAC English (actual need to be researched)I modified Template:Engvar/sandbox to use Module:Engvar/detect to automatically detect the language variety based on templates such as {{Use American English}} and {{EngvarB}} being present on the page if |engvar=auto
. This means, when used in templates, it would be specified as |engvar={{{engvar|auto}}}
. If there are no objections, I can copy the sandbox version into the live code.
EDITED TO ADD: I also added a |fallback=
parameter to the sandbox version, which allows Oxford to fall back to Canadian and then British English; Canadian to fall back to Oxford, US, and then British English; and all other commonwealth versions to fall back to British English if there is no entry for their language (if fallback fails, it would still use |defaultWord=
).
I also wanted feedback on how people would feel about making 'auto' default if no variety is specified (EDIT: and/or making |fallback=true
the default). I can't see any harm in doing that, but it probably needs more discussion than the above change since it could change the appearance of existing pages. --Ahecht (TALK
PAGE) 20:06, 5 June 2024 (UTC)
![]() | This edit request to Module:Engvar has been answered. Set the |answered= parameter to no to reactivate your request. |
Sync with sandbox [3].
This fixes the bug of |engvar=auto
outputting unwarranted maintenance categories. It affected 2000 United States presidential election[a] outside[b] Category:Articles_using_English_type_template. Category clutter aside, this bug made |engvar=auto
unusable for piped links. 142.113.140.146 (talk) 08:04, 20 August 2024 (UTC)
Notes
I have an idea for autodetecting AmE in article when absent is anything like {{Use American English}}. AmE is memed to use mdy, while BrE and IE's subarticles claim dmy. I think using this proxy variable is better than always defaulting to one variant. Adding a fallback check for {{Use mdy dates}} to Module:Engvar/detect is a much simpler solution than trying to parse keywords from the title. 142.113.140.146 (talk) 14:53, 21 August 2024 (UTC)