Am 09.04.2008 um 08:48 schrieb Pierre Joye:
On Wed, Apr 9, 2008 at 12:07 AM, David Zülke <[EMAIL PROTECTED]> wrote:
Note 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 :)

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).


David
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to