joeles - 18 February 2007 07:25 PM
It’d be nice to have a couple of new Inflector functions available for convert blocks of text to and from good ol’ American English and “rest-of-the-world” English. americanize() would replace obviously misspellings like colour and favourite with their proper American spelling of color and favorite. incorrectorize() would be the inverse function that would take perfectly good American English spellings and mess them up for the rest of the world. If Derek had these helper functions, he could have prevented the problems he had on his blog.
Actually, it would probably make better sense to revamp the language library to handle internationalization and localization better. At the moment, we have a configuration setting for the default language. It would make sense to include a setting for default country. If the language library included a language name to two-character ISO language code mapping and country name to two-letter ISO country code mappings, the language files could be stored in directrories named en_GB, en_US, en_AU, etc. This would also open the door for doing some neat things with regards to localization within the language files such as supporting the address formats, currencies, tax classes and tax rates, language display directions (rtl, ltr), locale-specific time and date formats, and other aspects of supporting multiple locales on a multilingual site.