ViewPart and Translatable Name [message #75164] |
Fri, 22 February 2008 05:37  |
Eclipse User |
|
|
|
Hi,
I need to translate the tab title of a viewPart at its initialization. I
try to use setPartName() in createPartControl(), but it only updates the
tab title when I set the focus on the viewPart.
I have seen that in the Extensions view of plugin.xml, the "name" field
has the following description :
"A translatable name that will be used in the UI for this view"
So, I would like to know if there is a way to parameter the name of the
viewpart at the initialization ?
Thanks for your help.
Regards,
Cédric G.
|
|
|
|
Re: ViewPart and Translatable Name [message #75199 is a reply to message #75181] |
Fri, 22 February 2008 08:09   |
Eclipse User |
|
|
|
Hi Benjamin,
In fact, the setPartName() works well. But when, I put it in the
createPartControl(), I still have to focus the viewPart on the browser to
see the title updating.
More generally, it has been asked to the application on which I'm working
to support Internationalization but not multisession-users
internationalization.
So, on the server side, I have an .ini file where I set the language of
the application.
Then, in the Activator class of the plugin, I read it and then use the
classic bundle implementation of RCP.
The application support two languages :
- resource_en.properties
- resource_fr.properties
All works well, but I have encountered the problem I have explained above.
Thanks for the tutorial :
I have tried to create a plugin.properties and export the viewPart name
from the
plugin.xml file to this file. That works well :)
But I got another question now :
I have created two files :
- plugin_en.properties
- plugin_fr.properties
In the start() method of the Activator class, I'm doing a SetLocale()
But the plugin is always starting with plugin_fr.properties. I think that
is because
my computer is set in French.
Is there a way to tell OSGi to start in a specific Locale ?
Thanks for your help,
Regards,
Cédric G.
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04428 seconds