Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » How can I change Platform.getNL() ?
icon4.gif  How can I change Platform.getNL() ? [message #652965] Mon, 07 February 2011 19:01 Go to next message
No real name is currently offline No real nameFriend
Messages: 8
Registered: December 2010
Junior Member
Hi!

I know how to get the parameter which language is used with Platform.getNL() .

But how can I change this without changing the launch-configuration. I try to do this at runtime!

Thank you for your answers!
Re: How can I change Platform.getNL() ? [message #653217 is a reply to message #652965] Tue, 08 February 2011 21:34 Go to previous messageGo to next message
Ralf Sternberg is currently offline Ralf SternbergFriend
Messages: 1313
Registered: July 2009
Senior Member

Hi,

I guess the correct answer is "you don't", but if you want to be sure,
you should ask on the equinox newsgroup.

Why do you want to do that? If you start the platform in multi-locale
mode there should be no need to change this setting at runtime. See [1],
scroll to Equinox Changes.

Hope this helps, Ralf

[1] http://help.eclipse.org/helios/index.jsp?topic=/
org.eclipse.platform.doc.isv/whatsNew/platform_isv_whatsnew. html

--
Ralf Sternberg

Twitter: @ralfstx
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: How can I change Platform.getNL() ? [message #653361 is a reply to message #653217] Wed, 09 February 2011 14:24 Go to previous messageGo to next message
No real name is currently offline No real nameFriend
Messages: 8
Registered: December 2010
Junior Member
Ralf Sternberg wrote on Tue, 08 February 2011 16:34
Hi,
(.,...)
Why do you want to do that? If you start the platform in multi-locale
mode there should be no need to change this setting at runtime. See [1],
scroll to Equinox Changes.
(...)



The design of the platform should allow the change of the language during runtime. I already found a possibilty to change the language of normal resource-bundles - but no way to change this parameter.
The goal is to switch between different plugin.properties with appropriate languages.
Re: How can I change Platform.getNL() ? [message #653369 is a reply to message #653361] Wed, 09 February 2011 14:33 Go to previous messageGo to next message
Benjamin Wolff is currently offline Benjamin WolffFriend
Messages: 115
Registered: July 2009
Senior Member
You are probably looking for RWT#setLocale(Locale). The RAP localization mechanism respects this value to pick the correct messages.properties and plugin.properties files. The value for this is provided by the client Browser or system settings. It can also be changed at runtime. Afaik the caveat is, that this value needs to be set BEFORE the Views and Dialogs etc. are created for a user session. Otherwise the internationalized text string have already been read and won't refresh by itself.

Correct me if i'm wrong, but that's how i do it. The user can select the language during a login Dialog.

Greetings,
-Ben


Am 09.02.2011 15:24, schrieb neumuellerch@gmail.com:
> Ralf Sternberg wrote on Tue, 08 February 2011 16:34
>> Hi,
>> (.,...)
>> Why do you want to do that? If you start the platform in multi-locale mode there should be no need to change this setting at runtime. See [1], scroll to Equinox Changes.
>> (...)
>
>
>
> The design of the platform should allow the change of the language during runtime. I already found a possibilty to change the language of normal resource-bundles - but no way to change this parameter. The goal is to switch between different plugin.properties with appropriate languages.
Re: How can I change Platform.getNL() ? [message #653576 is a reply to message #653369] Thu, 10 February 2011 10:21 Go to previous message
No real name is currently offline No real nameFriend
Messages: 8
Registered: December 2010
Junior Member
Benjamin Wolff wrote on Wed, 09 February 2011 09:33
You are probably looking for RWT#setLocale(Locale). The RAP localization mechanism respects this value to pick the correct messages.properties and plugin.properties files. (...)



Unfortunately this method does not change the language provided by Platform.getNL(). The requested plugin.properties is not changed Sad

And this although i changed called RWT.setLocale(...) before building the GUI.

Benjamin Wolff wrote on Wed, 09 February 2011 09:33

Correct me if i'm wrong, but that's how i do it. The user can select the language during a login Dialog.
.

Corrently not. The language should be changed via a button....



Thank you for your answers!
Previous Topic:Sessions not expiring.
Next Topic:Customize maximize/minimize - button of ViewPart?
Goto Forum:
  


Current Time: Sun Oct 17 01:58:22 GMT 2021

Powered by FUDForum. Page generated in 0.01532 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top