Re: Localization
Re: Localization
- Subject: Re: Localization
- From: David Griffith <email@hidden>
- Date: Tue, 10 Aug 2004 18:48:36 +0200
Hi,
How are you trying to change the language? Based on the user's choice from
a list, or from their browser's language choice?
WO handles the localization very well, using the localizable.strings files
in the resources folder. However I did find that it took a while to get the
hang of how it worked.
I haven't really tried to localize depending on the browser setting as there
seems to be quite a few things that impact how that works and it's not
necessarily always reliable (although I'm sure some people do use it).
Currently I have combined the built in localization of WO with some database
localization to create a very nice multi-lingual scenario. If you would
like to discuss it further, feel free to mail me directly - or post here so
others can possibly benefit also.
Regards,
Dave.
> Hey all European readers... progressing toward WO master mind, I feel
> trapped with the unavoidable 'cultural gap' across the Atlantic.....
> language and money formatting !
>
> 1- I am using a localized dictionary setup as following :
>
> NSArray languageArray = new NSArray(new Object[]
> {"Spanish","English"});
> byte[] pListBytes =
> rm.bytesForResourceNamed("MyDictionary.plist", null, languageArray);
> NSData pListData = new NSData(pListBytes);
> _lookupDict =
> (NSDictionary)NSPropertyListSerialization.propertyListFromData(pListData
> , "MacRoman");
>
> In my Resources folder , I have the 2 versions , English and Spanish
> key-value entries)
> MyDictionary.plist
> English
> Spanish
>
> But when I am testing the webapp with an English Safari user, I always
> get the French dictionary labels, unless I change the language order in
> the languageArray. In this case, I always get the English version, even
> if I switch to a Spanish user...
> In fact I cannot have a dynamic use of the dictionary based upon the
> web browser user .. what should I do ?
>
> 2 - I got another localization problem with number formatting
> I defined a numberFormatter as following :
> numberFormatter = new NSNumberFormatter();
> numberFormatter.setDefaultLocalizesPattern(true);
> and I am using this formatter with my WOTextFields,
> but I don't get the $ or euro currency according to the web browser
> user.... neither the thousand separator (different in Europe...
> swapping US decimal (dot) and thousand (comma) to European decimal
> (comma) and thousand (dot) separators... I should have missed
> something somewhere ...... but what ?
>
> thanks for your help
> _______________________________________________
> webobjects-dev mailing list | email@hidden
> Help/Unsubscribe/Archives:
> http://www.lists.apple.com/mailman/listinfo/webobjects-dev
> Do not post admin requests to the list. They will be ignored.
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.