Window Builder Pro cannot interpret JBuilders I18n style

Swing Designer allows you to quickly create the frames, panels, dialogs, applets and other UI elements that comprise Java Swing applications.

Moderators: Konstantin.Scheglov, gnebling, Alexander.Mitin, jwren, Eric Clayberg

Window Builder Pro cannot interpret JBuilders I18n style

Postby Christoph Kloppenburg » Thu Aug 16, 2007 7:59 am

Dear all,

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
Christoph Kloppenburg
 
Posts: 3
Joined: Thu Aug 16, 2007 7:22 am

Re: Window Builder Pro cannot interpret JBuilders I18n style

Postby Eric Clayberg » Fri Aug 17, 2007 4:11 am

Support for ResourceBundle.getBundle(String, Locale) has been added to the latst build.
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA


Return to Swing Designer

Who is online

Users browsing this forum: No registered users and 1 guest