Ulrich Mueller schrieb:
On Mon, 6 Jun 2016, Chí-Thanh Christopher Nguyễn wrote:
Ulrich Mueller schrieb:
Question related to this, do we take the opportunity to standardise
the values? Looks like the vast majority follows
language[_territory][@modifier] specified by POSIX [1] but some
don't.
What do we do with locales that don't fit into this scheme? Catalan
Valencian is one such locale.
Packages currently use modifiers (ca@valencia) or ISO 3166-1
reserved area (ca_XV) or something entirely different (ca_valencia).
According to [1], "valencia" is a valid variant subtag, therefore
ca@valencia should be fine.
ISO 3166-1:ES defines ES-VC as region code, so maybe ca_ES-VC would
be best. Though a quick Google search didn't find any major usage of
that either.
Neither XV nor ES-VC are registered as a subtag though, so presumably
these should be avoided.
I'm not totally convinced yet.
Following the BCP-47 spec the format is
Language-Tag = langtag ; normal language tags
langtag = language
["-" script]
["-" region]
*("-" variant)
*("-" extension)
["-" privateuse]
So using the language ca, region es, and variant valencia, the BCP-47
language tag is ca-es-valencia (or ca-valencia if you omit the region).
POSIX.1-2008[2] as you mentioned defines a slightly different format for
locales
language[_territory][.codeset]
Only LC_COLLATE, LC_CTYPE, LC_MESSAGES, LC_MONETARY, LC_NUMERIC, and
LC_TIME additionally accept specification of a modifier.
[language[_territory][.codeset][@modifier]]
Where territory is implementation defined and the modifier "select[s] a
specific instance of localization data within a single category". Which
I think does not match what we want with "valencia" variant of the "ca"
language.
Hence I think POSIX locale cannot handle Catalan Valencian, unless
territory is made accept ISO3166-2 region subdivisions.
Best regards,
Chí-Thanh Christopher Nguyễn
[1] https://tools.ietf.org/rfc/bcp/bcp47.txt
[2]
http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap08.html#tag_08_02