Nocturnus has asked for the wisdom of the Perl Monks concerning the following question:
Dear monks,
I am developing a web application for an international audience and have the following problem:
At first, the user chooses his country. Based on that selection, the application should offer him appropriate time zones and appropriate locales.
For the time zones, this is no problem. I am using DateTime::TimeZone -> names_in_country to get all time zones which a certain country has.
But I don't get how to do this for the locales. I did not find any module or function which allows me to extract all locales which are used in a certain country. The usual locale codes like en-US denote the language (en) and something which seems to be called a "territory" (US), and I don't think that (all) territory codes are valid country codes or vice versa.
Could anybody give me a hint how to solve this problem? Perhaps the basic idea of offering appropriate locales based on a country code is wrong?
Regards,
Nocturnus
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Relationship between timezone country and locale territory? (updated x3)
by haukex (Archbishop) on Sep 14, 2016 at 19:07 UTC | |
by Nocturnus (Scribe) on Sep 15, 2016 at 06:26 UTC | |
|
Re: Relationship between timezone country and locale territory?
by Your Mother (Archbishop) on Sep 14, 2016 at 21:20 UTC | |
by Nocturnus (Scribe) on Sep 15, 2016 at 06:32 UTC | |
by Your Mother (Archbishop) on Sep 15, 2016 at 13:29 UTC | |
by Nocturnus (Scribe) on Sep 15, 2016 at 14:21 UTC | |
by afoken (Chancellor) on Sep 16, 2016 at 09:41 UTC |