Template:BCP47: Difference between revisions
Template page
More actions
m Gaulish fixed |
m fix incorrect nesting of some HTML comments |
||
| Line 6: | Line 6: | ||
|als=gsw | |als=gsw | ||
|bat-smg=sgs | |bat-smg=sgs | ||
|de-formal=de<!-- could be "de-x-formal", but actually a subset within standard "de" for HTML/XML --> | |||
|eml=egl<!-- retired code, the de facto eml.wikipedia uses Emilian, not Romagnol --> | |||
|fiu-vro=vro | |fiu-vro=vro | ||
|mo=ro-cyrl<!-- retired, best fit on Wikimedia sites, but no longer working in interwikis (Wikipedia project deleted) --> | |||
|nl-informal=nl<!-- could be "nl-x-informal", but actually a subset within standard "nl" for HTML/XML --> | |||
|nrm=nrf<!-- Wikimedia sites uses "nrm" to mean Norman, but standard "nrm" is an unrelated language. The "nrf" code is now standardized for Norman (previously used a private-use extension of French "fr-x-nrm") --> | |||
|roa-rup=rup | |roa-rup=rup | ||
|simple=en<!-- could be "en-simple" but actually a subset within standard "en" for HTML --> | |simple=en<!-- could be "en-simple" but actually a subset within standard "en" for HTML --> | ||
| Line 15: | Line 20: | ||
<!-- other current BCP47 violations by Wikimedia sites, fixed using private-use extensions (if they are needed, labels are limited to 8 letters/digits) --> | <!-- other current BCP47 violations by Wikimedia sites, fixed using private-use extensions (if they are needed, labels are limited to 8 letters/digits) --> | ||
|cbk-zam=cbk-x-zam | |cbk-zam=cbk-x-zam | ||
|map-bms=jv-x-bms | |map-bms=jv-x-bms | ||
|roa-tara=it-x-tara | |roa-tara=it-x-tara | ||
|tokipona|tp=x-tokipona | |||
<!-- conforming BCP47 "private-use" extensions used by Wikimedia, which are no longer needed, and improved using now standard codes --> | <!-- conforming BCP47 "private-use" extensions used by Wikimedia, which are no longer needed, and improved using now standard codes --> | ||
| Line 83: | Line 84: | ||
|zh-yue=yue<!-- still used in some old Wikimedia templates and in interwikis --> | |zh-yue=yue<!-- still used in some old Wikimedia templates and in interwikis --> | ||
<!-- other "inherited" tags of the standard, strongly discouraged as they are deleted, but with no defined replacement there are left unaffected (complete list that should not be augmented now) | <!-- other "inherited" tags of the standard, strongly discouraged as they are deleted, but with no defined replacement there are left unaffected (complete list that should not be augmented now)--> | ||
|cel-gaulish=xtg<!--ambiguous, most often "xtg" for Transalpine Gaulish in today's France, may also be "xcg" for Cisalpine Gaulish in today's Northern Italy--> | |cel-gaulish=xtg<!--ambiguous, most often "xtg" for Transalpine Gaulish in today's France, may also be "xcg" for Cisalpine Gaulish in today's Northern Italy--> | ||
|i-enochian=x-enochian? | |i-enochian=x-enochian? | ||
|i-mingo=x-mingo? | |i-mingo=x-mingo? | ||
<!-- other standard "redundant" tags, which were unnecessarily registered (they validate with standard subtags) and that are left unaffected (complete list that should not be augmented now) | |||
|az-arab | |az-arab | ||
|az-cyrl | |az-cyrl | ||
| Line 129: | Line 131: | ||
|zh-hant-sg | |zh-hant-sg | ||
|zh-hant-tw | |zh-hant-tw | ||
--- standard special codes | |||
|mul | |mul | ||
|und | |und | ||
--- all other unaffected tags: | |||
Minimal check of validity (valid BCP47 codes are necessarily stable over URLENCODE and #titleparts). | Minimal check of validity (valid BCP47 codes are necessarily stable over URLENCODE and #titleparts). | ||
The check ensures that the code contains only ASCII letters, digits or hyphens, and starts by a letter. | The check ensures that the code contains only ASCII letters, digits or hyphens, and starts by a letter. | ||
| Line 138: | Line 140: | ||
urlencoded characters (including quotes, braces, ampersands...), slashes, or any HTML or wiki formatting | urlencoded characters (including quotes, braces, ampersands...), slashes, or any HTML or wiki formatting | ||
(see also [[Template:CURRENTCONTENTLANGUAGE]]). If successful, force result to lowercase; otherwise return "und". | (see also [[Template:CURRENTCONTENTLANGUAGE]]). If successful, force result to lowercase; otherwise return "und". | ||
--> | |||
|#default = | |#default = | ||
{{#ifeq: {{#titleparts:{{{1|}}}|1}} | {{#titleparts:{{{1|}}}||-1}} | {{#ifeq: {{#titleparts:{{{1|}}}|1}} | {{#titleparts:{{{1|}}}||-1}} | ||