Re: Web pages localotation in WO
Re: Web pages localotation in WO
- Subject: Re: Web pages localotation in WO
- From: Jean-François Veillette <email@hidden>
- Date: Mon, 18 Apr 2005 07:05:24 -0400
The 'official' way to localize an interface in wo is to localize the
component template ( .wo ), or use
WOResourceManager.stringForKey("aKey") and have a localized
Localized.plist file with corresponding values.
Rewriting .wo is eavyweight, because in addition to duplicating the
layout, it duplicate the bindings ... it end up duplicating the effort
to maintain.
If you do not want to rewrite multiple .wo for your localization
support, I suggest you to use a mechanism where you overwrite
valueForKeyPath in your root component (assuming you have a root
component class).
In your root component class, you would trap a binding like this :
@translate.Hello
to do
woresourcemanager.stringForKey(key); // where you extracted the "Hello"
keyword in the variable 'key'.
You then have to localize a file named Localized.plist :
{
Hello = "Salut";
}
If your localization comes from the database, i.e. that you have
multiple column for multiple localization name; nameFR, nameEN, name
ZU ...
then I would suggest to use the same mechanism, but use
@translateBD.name
and translateBD would do the right thing, appending the right suffix to
get the correct key and reapply key-value-coding with the new complete
key.
I have done this exact strategy (with some variations), and is working
quite well, is lightweight and very easy to maintain.
If you need some piece of code, let me know I could send it off-list.
- jfv
Le 05-04-18, à 06:40, email@hidden a écrit :
Hi,
Yes you can.
read about localization in WebObjects. this is a supported feature in
WO.
Sako.
----- Original Message -----
From: "Amedeo Mantica" <email@hidden>
To: "WO List" <email@hidden>
Sent: Monday, April 18, 2005 12:15 PM
Subject: Web pages localotation in WO
Hi, is possible do define some localization strings in WO ?
I need to build a database system for a multilanguage site, is
possible
to mantain a single java and localized wo pages?
Thanks
best Regards
Amedeo
_______________________________________________
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