Re: intl naming
| From: | David Zülke | Date: | Wed, 09 Apr 2008 07:01:21 +0000 |
| Subject: | Re: intl naming | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-36895@lists.php.net to get a copy of this message | ||
Am 09.04.2008 um 08:48 schrieb Pierre Joye:
On Wed, Apr 9, 2008 at 12:07 AM, David Zülke <dz@bitxtender.com> wrote:Sure, but you need to remember that this means someone has to maintain the mappings. Mind you that pretty much any locale-related information is in the CLDR already - language, territory and timezone mappings, for instance. Be advised that attempting to map, for instance, a country code to a locale is futile anyway. You can't map "ch" to anything. There's de_CH, fr_CH and it_CH locales to choose from. Locales and country/language/blah codes really are differnt things, and I've never needed automated mappings so far (usually, the locale code itself is more than enough). DavidNote that most of this info is already in the CLDR info. And I am with Stas here, not sure if it's really necessary. You can do this mapping by hand, if necessary, but trust me, it isn't in most cases; you know the locale IDs beforehand.I'm willing to trust you but my experiences tell me that it is not always available before hand and that every 2nd lib duplicate this information (partially or completely. It has no bad side effect to introduce some new methods for this purpose :)