Hi Drew,
On 12-Jun-08, at 12:19 PM, Drew Thoeni wrote:
My mail box remains empty on this question.
Everyone is having fun in San Francisco!
Is there anyone with localization experience that could suggest
what I'm doing incorrectly?
Not too much, but we will see what I can offer....
I'm trying to send back the language of the users pre-selected
choice (store in database). But the ERXLocalizer.setDefaultLangauge
() seems to have no effect.
This should be no problem if you're using Wonder.
Regards,
Drew
On Jun 10, 2008, at 7:46 AM, Drew Thoeni wrote:
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."
Perfect.
I want the user to select their language of preference in the
application so I store that in the database.
Check out ERXSession for the code used to manipulate the Localizers
that are available and the one that is chosen...
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 think you want "setLanguage(String language)"
Is your "laguagePreference() method named correctly? might have to be
"languagePreference"?
Have you tried setting the localization properties for Wonder instead
of initializing in your app? These properties are used in BugTracker:
ERXLanguages = (en)
#er.extensions.ERXLocalizer.availableLanguages=(English,German)
er.extensions.ERXLocalizer.availableLanguages=(English)
er.extensions.ERXLocalizer.frameworkSearchPath=("app",
"BTBusinessLogic", "ERExtras", "ERDirectToWeb", "ERExtensions")
er.extensions.ERXLocalizer.fileNamesToWatch =
("Localizable.strings","ValidationTemplate.strings")
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).
All the Wonder frameworks are done with UTF-8. I think that is the
recommended encoding. I believe that this property will cover
everything for you:
er.extensions.ERXApplication.DefaultEncoding=UTF-8
You may want to take this subject to the Wonder list and/or check out
the Wonder archives where this is covered quite extensively.
David
Regards,
Drew
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/drewt7%
40comcast.net
This email sent to [EMAIL PROTECTED]
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/programmingosx
%40mac.com
This email sent to [EMAIL PROTECTED]
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com
This email sent to [EMAIL PROTECTED]