• 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
Re: Localization problem, hello world too [solved]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Localization problem, hello world too [solved]


  • Subject: Re: Localization problem, hello world too [solved]
  • From: phil <email@hidden>
  • Date: Tue, 02 Dec 2008 07:46:31 +0100

Hi Ramsey,

Setting the er.extensions.ERXApplication.fixCachingEnabled property solved the problem. Thank you so much for the time spent tracking the bug.

Now I've a lot of mods to do in my apps but I think I'll spend some time to set up UI tests and try to keep up to date with versions of Wonder.

PHiL






Ramsey Lee Gurley a écrit :
Phil,

I just built a small localized app and I can verify this problem on WO 5.4.3 and latest Wonder. Setting the language on the session explicitly has no effect. Between English and Japanese, it always uses the English component. Even setting the default language in the properties file has no effect on the component...

I've spent the afternoon hunting for the bug and I've located what I think is the source of your problem in Wonder revision 7819. It seems to have been made after I had made my notes, but before I published them on the wiki.. d'oh! Try setting

er.extensions.ERXApplication.fixCachingEnabled=false

In your properties file and see if that doesn't get the server to respect the browser defaults. I say a partial fix, because setting the language in the session does not change the component returned. It always returns the browser default... which may not be what you want. Without that property set, ERXApplication seems to be setting the component used in the following seemingly arbitrary order:

("Italian", "German", "Dutch", "Norwegian", "English", "Japanese", "Russian", "French")

To override the browser default problem, I think you can override the session languages() method to return the languages array in the proper order... meaning localizer().language() first instead just passing the list of context().request().browserLanguages() which seems to be the default.

Ramsey

On Dec 1, 2008, at 9:33 AM, phil wrote:

Hi,

To Ramsey:
Yes I'm sure I'm using session, cause I'm NSLogging from my Session.java, extension of ERXSession...




I tried to create a new Application, following the Hello World tutorial.
As long as my only localizations are Strings in Localizable.strings, this works, browser preferencies allow me to choose english or german.


But when I include localized components into the mix, localization stop working immediately and use only one language (German even if English is the default)

So this makes me think that either I'm missing something or something is broken...


Does anybody use localized components successfully? Is this totally unsupported?


In our legacy apps, the former developper made heavy use of localized components :-(

PHiLippe




Ramsey Lee Gurley a écrit :
Are you sure you have a session? If you don't have one, the app will go with the server's default language no matter what you set in the browser.

http://wiki.objectstyle.org/confluence/display/WO/Web+Applications-Development-Localization+and+Internationalization


Try the method near the bottom of the page there and see if that helps.

On Nov 28, 2008, at 5:15 AM, phil wrote:

Hi

I'm in the lasts steps to port an XCode WO 5.3.3 application to Eclipse.
I also updated the wonder framework (not the latest, wonder-5.0.0.8273)


I'm able to compile the application and run it  from eclipse or
deployed. The only thing that is still a problem is
translation/localization.

This app is available in three languages: French/German/English. We use
a mix of String/components localization with three directories:
French.lproj / German.lproj / English.lproj which contains all a
Localizable.strings and a bunch of localized components .wo files.
This worked for years. (with XCode)


Now the application only uses German. If I delete the
.woa/Content/Ressources/German.lproj it then only uses English and if I
delete English.lproj it then uses French. So I conclude that all the
files are at the right place, with right permissions.
We both detect the language from the browser and permit users to force
it to one of their choice.


I verified in the Session that the localizer used is the right one:
2008-11-28 10:43:55 CET] <WorkerThread0> Session language: French
[2008-11-28 10:43:55 CET] <WorkerThread0> Session localizer:
<er.extensions.localization.ERXLocalizer French>

so the choosen language seems successfully set. But the wo files used
are alway those from the German.lproj ???

Does someone have an idea of what I'm missing?

Best regards

PHiLippe

_______________________________________________
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




_______________________________________________ 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:
    • Re: Localization problem, hello world too [solved]
      • From: Anjo Krank <email@hidden>
References: 
 >Re: Localization problem, hello world too (From: phil <email@hidden>)
 >Re: Localization problem, hello world too (From: Ramsey Lee Gurley <email@hidden>)

  • Prev by Date: Re: Waiting for Session Check-Out
  • Next by Date: Re: Localization problem, hello world too [solved]
  • Previous by thread: Re: Localization problem, hello world too
  • Next by thread: Re: Localization problem, hello world too [solved]
  • Index(es):
    • Date
    • Thread