• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Localizer Default vs. Browser
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Localizer Default vs. Browser


  • Subject: Localizer Default vs. Browser
  • From: Drew Thoeni <email@hidden>
  • Date: Tue, 10 Jun 2008 07:46:31 -0400

I'm using ERXLocalizer and am using, base on Chuck's Practical Webobjects recommendations, the "replace string via localizable.strings" method instead of the "replicate each component method."

I want the user to select their language of preference in the application so I store that in the database. In the session I use ERXLocalizer.setDefaultLanguage to set the user's preference based on their stored preference. Code:

NSArray<String> languageArray = new NSArray( new Object[] {"English", "Spanish"} );
ERXLocalizer.setAvailableLanguages( languageArray );
ERXLocalizer.setDefaultLanguage( session.currentUserLoggedIn.laguagePreference() );

I believe, though, that WO is overriding this with the preference from the browser. Since I'm testing from Safari (Mac) and have the test computer running in English, I get the English localization strings instead of the user-selected localization strings. 

What is the method to use to force the return of the language selected by the user and ignore the browser? And, since I'm just starting on this, if there are other tips on localization bug-a-boos, I'd be thankful.  (I've already changed the string files to UTF-16, that helped).

Regards,

Drew
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Localization Help! (was Localizer Default vs. Browser)
      • From: Drew Thoeni <email@hidden>
  • Prev by Date: Re: Entity Modeler + Fetch Specs + null oddness
  • Next by Date: Re: Entity Modeler + Fetch Specs + null oddness
  • Previous by thread: Re: LEWOStuff (the stuff with JSON-RPC!)
  • Next by thread: Localization Help! (was Localizer Default vs. Browser)
  • Index(es):
    • Date
    • Thread