You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Kintzel Levente <ki...@codespring.ro> on 2006/02/02 13:04:32 UTC

Locale

Hi!

 

I want to develop an application with multiple locales. The user can change
the locale from a navigation part, and the content must be displayed in
another language. For this I tried to use the Localization service that
loads the labels from different bundles correctly. My problem is how to make
Turbine not to forget the chosen locale. I tried to set the locale of
RunData (runData.setLocale(new Locale("localeid"))) but when I change the
screen the locale is reset to default locale specified in TR.prop. Why? Is
there a specific way to store the chosen locale that persist all the
application? Or must I store it on the session?

 

Thank you!

 

   Regards,

           Levi

 

P.S. My Turbine version: 2.3.2


Re: Locale

Posted by sergiu gordea <gs...@ifit.uni-klu.ac.at>.
  Hi Levi,

Well ...

Rundata objects is build from request, so ... the scope of this object 
is "request".
Of course, you need to save the user preferences into the session.
"Aplication" ... means for all users, I don't think that you want one 
user to change the preferences
of another user!!!

 Best,

 Sergiu

PS: you can save the locale into the database too, so that at the next 
login, the user doesn't need to
change the language again.

Kintzel Levente wrote:

>Hi!
>
> 
>
>I want to develop an application with multiple locales. The user can change
>the locale from a navigation part, and the content must be displayed in
>another language. For this I tried to use the Localization service that
>loads the labels from different bundles correctly. My problem is how to make
>Turbine not to forget the chosen locale. I tried to set the locale of
>RunData (runData.setLocale(new Locale("localeid"))) but when I change the
>screen the locale is reset to default locale specified in TR.prop. Why? Is
>there a specific way to store the chosen locale that persist all the
>application? Or must I store it on the session?
>
> 
>
>Thank you!
>
> 
>
>   Regards,
>
>           Levi
>
> 
>
>P.S. My Turbine version: 2.3.2
>
>
>  
>


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


R: Localization tool

Posted by Damiano Zucconi <d....@isipc.it>.
Hi

You can always give your implementation of
org.apache.turbine.services.localization.LocalizationService to use instead
of org.apache.turbine.services.localization.TurbineLocalizationService.
In your implementation you can choice the best position for your bundle and
the best way to load it.

Damiano Zucconi

-----Messaggio originale-----
Da: Matis Aniko [mailto:matis.aniko@codespring.ro]
Inviato: lunedi 6 febbraio 2006 11.41
A: 'Turbine Users List'
Oggetto: Localization tool


Hello!

I'm using turbine version 2.3.2 for my web application.
I'd like to keep my resource bundle outside the WEB-INF/classes directory,
but I couldn't find a solution for it.
So basically this works:

Localization.getString("egy/newsmodule_labels", new Locale("hu"), "egy")

And this doesn't:

Localization.getString("../conf/modules/newsmodule/newsmodule_labels", new
Locale("hu"), "egy")

Do you have any solutions or suggestions?

Aniko Matis


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


Localization tool

Posted by Matis Aniko <ma...@codespring.ro>.
Hello!

I'm using turbine version 2.3.2 for my web application.
I'd like to keep my resource bundle outside the WEB-INF/classes directory,
but I couldn't find a solution for it.
So basically this works:

Localization.getString("egy/newsmodule_labels", new Locale("hu"), "egy")

And this doesn't:

Localization.getString("../conf/modules/newsmodule/newsmodule_labels", new
Locale("hu"), "egy")

Do you have any solutions or suggestions?

Aniko Matis


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org