I' just trying to convert my old JBuilder 6 application to eclipse and discovered Window Builder Pro.
In my application I'm doing I18n using this style:
a) the application is started with a parameter stating the language,
as a consequence, the following code is executed (e.g):
- Code: Select all
Global.currentLocale = new Locale ("en", "UK");
b) in every other java file, where applicable, the language is set like this:
- Code: Select all
ResourceBundle res = ResourceBundle.getBundle("My.Resources", Global.currentLocale)
c) all the visual components (e.g. a label) receive their texts like this:
- Code: Select all
Label1.setText(res.getString("Qb");
Now when the designer parses the code, it does not know about the current locale and leaves the label empty.
Can I change this behavior? Is it possible to add a "standard instruction" to be executed before the designer parses the code to set the locale to a standard value? It is not important to switch the locale at design time, but it would be nice to see my texts in _any_ language.
Thank you very much in advance,
any pointer is welcome