Locale change and JFaceResources [message #1833763] |
Fri, 23 October 2020 08:43  |
Eclipse User |
|
|
|
Hi,
we have a RCP Application based on Eclipse Mars.1 and we are in the process of supporting multiple languages.
We use the "new eclipse localization" described by Dirk Fauth and Tom Schindl here http://blog.vogella.com/2013/05/22/eclipse-internationalization-part-24-new-message-extension-by-dirk-fauth-and-tom-schindl/
Before the Workbench shows up we use a Splash Screen to provide a login form. After Login we switch the Application language to the preffered language of the user, which can be different from the system language.
In order to get that working we are starting our product with
-Declipse.registry.MultiLanguage=true
We do the locale switch with something like
Locale.setDefault(userLocale);
IEclipseContext context.set(TranslationService.LOCALE, userLocale);
Overall this works as expected (Views and Editors are in english etc. ), but e.g. in the about Dialog (and probably in other parts of Eclipse) the Buttons "Installation Details" are still in the system language (german in my case) and not in the user language.
Root cause from my point of view is the class JFaceResources where the translations are obtained by
public static String getString(String key) {
which get's them from a static ResourceBundle which get's initialized very early
/**
* The JFace resource bundle; eagerly initialized.
*/
private static final ResourceBundle bundle = ResourceBundle
.getBundle("org.eclipse.jface.messages"); //$NON-NLS-1$
Is there anything I've missed or I can do to get these JFace Strings also in the correct language?
Is this somehow changed/fixed in newer Eclipse versions?
Thanks for any hints!
Best Regards,
Peter
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04352 seconds