Hey all, I'm working with an app that's setup to do two languages (English and Japanese) and am working on some code to localize currencies (just formatting). I've added a key to both the English and Japanese Localizable.strings files and reference those keys in numberformat declarations.
This mostly works okay. :) For Japanese, everything is fine...the Yen symbol in the format string is represented properly. The problem I'm having is with the dollar sign symbol…which, when formatted by NSNumberFormatter converts to an international currency symbol. It looks like when ERXLocalizer creates it's NSNumberFormatters it sets the localizesPattern property to true, which then tells the formatter to replace $ with the Locale's country's appropriate currency symbol (plus some other formatting features). The problem is that the Locales that ERXLocalizer creates don't really have enough information to have NSNumberFormatter's localizesPattern logic to work properly. Since it creates Locale's based soley on language, and never a country, the $ replacement logic defaults to the international format. I would argue that ERXLocalizer shouldn't be setting NSNumberFormatter's localizesPatterns property to true, since it's never going to have a country. Or, ERXLocalizer needs to support Locale properties that are more than just the short language. "en_US" for example, still just equates to a Locale without a country (not equivalent to Locale.US). Any thoughts or ideas on how to work around this? -Lon _______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com