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