How to do internationalization for the strings in plugin.xml? [message #535288] |
Fri, 21 May 2010 21:35 |
Alexandra Niculai Messages: 84 Registered: July 2009 |
Member |
|
|
Hi
My application is an SWT application at the moment and I'd like to transfer it to RCP. Until now I've been using the gettext tool from GNU for the internationalization and I like it, because it keeps my code readable.
I looked through examples of RCP applications and I see that for all the strings that appear in the java files I can continue to use gettext; for each string I need, I just call a method, like _("This string should be translated") and there is no need for .properties files.
But I also saw that the names of the menus and other stuff, like the name of the application, etc. are kept in the plugin.xml file. I tried to use the externalize strings tool that comes in Eclipse, but this generates a .properties file and the ids of the strings may not contain any spaces,besides, if I want to keep them readable, I have to edit each one of them.
Is there a way of using gettext from GNU for the plugin.xml file?
[Updated on: Sat, 22 May 2010 13:27] Report message to a moderator
|
|
|
Re: How to do internationalization for the strings in plugin.xml? [message #535360 is a reply to message #535288] |
Sat, 22 May 2010 18:17 |
Ed Merks Messages: 33140 Registered: July 2009 |
Senior Member |
|
|
Alexanda,
Surely you can come up with readable keys for your plugin.properties.
There is no other way.
Alexandra Niculai wrote:
> Hi
>
> My application is an SWT application at the moment and I'd like to
> transfer it to RCP. Until now I've been using the gettext tool from
> GNU for the internationalization and I like it, because it keeps my
> code readable. I looked through examples of RCP applications and I see
> that for all the strings that appear in the java files I can continue
> to use gettext; for each string I need, I just call a method, like
> getString("This string is translated") and there is no need for
> .properties files. But I also saw that the names of the menus and
> other stuff, like the name of the application, etc. are kept in the
> plugin.xml file. I tried to use the externalize strings tool that
> comes in Eclipse, but this generates a .properties file and the ids of
> the strings may not contain any spaces,besides, if I want to keep them
> readable, I have to edit each one of them.
> Is there a way of using gettext from GNU for the plugin.xml file?
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.02825 seconds