How to set the Locale /Language (i18n) RCP application dynamically [message #461364] |
Wed, 10 January 2007 00:58  |
Eclipse User |
|
|
|
Originally posted by: jayam.balasubramaniam.gmail.com
I have created an RCP application .To internationalize the application i externalized the strings and created a properties file ,for other language(for example German) i created a fragment project with properties files.When i pass the command line argument as -nl de or -nl fr the application start up in the corresponding language and all working fine.Now i want to set the locale dynamically, so i have created dialog asking the user to select the language when application starts. here all are working fine expect the Help--->About option and Perspective name is not getting changed (i.e.) it remains in English Language.
I tried these code to set the language
System.setProperty("osgi.nl",de); and this also
System.getProperties.put("osgi.nl",de); and
Locale.setDefault(Locale.German):
1.How i can change the language of the application dynamically?
2.We can restart the application and pass the argument,then how?
3.We can create another plugin having Language dialog and start this application plugin,Then how to integrate the plugins?
Please help me to resolve this.
Thanks,
Jai
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: How to set the Locale /Language (i18n) RCP application dynamically [message #463990 is a reply to message #461514] |
Wed, 21 February 2007 12:30  |
Eclipse User |
|
|
|
I couldn't get the following to work
-nl fr_CA all on one line in eclipse.ini
but this DOES work
-nl
fr_CA
with each element on a separate line
"Alex Blewitt" <alex_blewitt@yahoo.com> wrote in message
news:28610097.1168497209642.JavaMail.root@cp1.javalobby.org...
> You can do either:
>
> a) Set osgi.nl=fr in the config.ini
> b) Set -nl fr in the eclipse.ini (before the -vmargs, on a separate line)
>
> The config.ini may be shared between multiple apps in the same installed
> location, whereas each will have their own eclipse.ini. So it might be
> nicer to change the config.ini; that way, if the user were to start up a
> 2nd app in the same location, they'd see the new language too.
>
> I'm not sure that you can change the perspective name through code.
> However, if you have %name in the Manifest, and a plugin.properties with
> name=The Perspective, then you can supply a plugin.properties_fr name=La
> Perspective and the translation is done then. Same goes for any other text
> item in the manifest/plugin.xml.
>
> Alex.
|
|
|
Powered by
FUDForum. Page generated in 0.05074 seconds