Localization of JFace MessageDialog [message #1580382] |
Fri, 23 January 2015 08:08  |
Eclipse User |
|
|
|
Hi,
I'm trying to translate the buttons of a JFace MessageDialog. In English they are shown with "OK" and "Cancel". But in German they still are shown with "OK" and "Cancel".
I created the RAP Hello World example.
Added this to
BasicEntryPoint#createContents
MessageDialog.openConfirm(button.getShell(), "Title", "Buttons should be translated");
BasicApplication
public void configure(Application application ) {
...
application.setOperationMode( OperationMode.SWT_COMPATIBILITY );
}
Copied the messages.properties from the org.eclipse.rap.jface... plugin to my plugin under src.org.eclipse.jface and renamed it to messages_de.properties. And did change the strings to
build.properties looks like
bin.includes = META-INF/,\
OSGI-INF/,\
.,\
src/org/eclipse/jface/messages_de.properties
PS:
RWT.getLocale() is de_DE
The Cancel Button still has the text "Cancel". What am i missing?
[Updated on: Fri, 23 January 2015 08:23] by Moderator
|
|
|
|
|
|
|
|
|
|
|
|
Re: Localization of JFace MessageDialog [message #1602331 is a reply to message #1602251] |
Thu, 05 February 2015 08:33  |
Eclipse User |
|
|
|
By the way I understand it and made it work is that the -nl argument defines what is the default Locale of your Application. You don't need that. Once you added the *nl_* fragments from Babel to your launch config, you can change the language by changing the language of your browser. I believe nothing else is necessary. Unfortunately, I never tried to change the Locale on the run through a widget.
|
|
|
Powered by
FUDForum. Page generated in 0.05263 seconds