Skip Menu |

This queue is for tickets about the Locale-Codes CPAN distribution.

Report information
The Basics
Id: 61345
Status: resolved
Priority: 0/
Queue: Locale-Codes

People
Owner: Nobody in particular
Requestors: njh [...] bandsman.co.uk
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: 3.13
Fixed in: (no value)



Subject: Language variants
It would be nice if one could have a code2languagevariant: code2languagevariant('en') would return "English" code2languagevariant('en_gb') would return "English, British"
This doesn't appear to me to be a task that should be performed by Locale::Codes. Locale::Codes basically stores codes from some standards in a dictionary, and allows you to look them up. So, if there is a standard out there that is of general use, I'm interested in adding it. What I'm NOT interested in doing is adding support for the different ways you might use that dictionary. The language-subtag codes (en-CA) are actually a combination of a language code and a subtag which might be a language subtag, a country code, or a region tag. In other words, there's no standard out there that I could see that lists all valid language-subtag values. NOTE: If I'm incorrect, and someone can point me to such a standard, I would definitely implement it since this is definitely of general use. Given my research, I'm probably going to add support for language subtags (as defined in the IANA registry: http://www.iana.org/assignments/language-subtag-registry) since that's a standard I wasn't previously aware of, and might be of use to some people. At that point, it would make sense to write a second module which used Locale::Codes to do all the lookups to actually parse the language-subtag codes. Unfortunately, that isn't a module I'm interested in writing at this point, so I'm afraid that will fall to someone else.