Closed 747 closed 2 years ago
The documentation has been updated to clarify that the value of the lang
attribute must be a BCP 47 language tag. That's because the attribute value is passed directly to the lang attribute or xml:lang attribute for HTML and DocBook, respectively.
If you believe that one of the locale files is named incorrectly and needs to be changed, feel free to submit a pull request to correct it.
75.1. Translating built-in labels
A.2. Built-in Attributes
(emphasis by me)
The country code and the language code are different standards (ISO 3166-1 and ISO 639), and there's no "country code for English". Moreover, there's neither "XML country code" nor "XML language code", by which I think you mean language tag (BCP 47), which is the only binding standard in the XML spec among them.
This confusion brings about actual contradictions in your assets in https://github.com/asciidoctor/asciidoctor/tree/master/data/locale, namely:
misnomers if it means country code (or locale)
ar
: Argentina, not any Arabic countriesca
: Canada, not Cataloniacs
: reserved for former Serbia and Montenegro, not Czechfa
: nonexistentja
: reserved for Jamaica, not Japannb
: nonexistentnn
: nonexistentpt_BR
: invalid even as Portugal's subdivisionsr
: Suriname, not Serbiasr_Latn
: invalid even as Suriname's subdivisionsv
: El Salvador, not Swedenuk
: reserved for United Kingdom, not Ukrainezh_CN
,zh_TW
: nonexistentmisnomers if language code
kr
: Kanuri, not Koreanpt_BR
,sr_Latn
,zh_CN
,zh_TW
: no such formatmisnomers if language tag
kr
: Kanuri, not KoreanStrictly speaking, subtags of a language tag need to be connected by hyphen, not underscore.