Strategy for I18N [message #815710] |
Thu, 08 March 2012 00:47  |
Eclipse User |
|
|
|
what's the best way to internationalize the code generated with WB, yet not inhibit the capability of using the visual editor?
for example, if i create a label "Name", the code generated by WB will have a line like this:
JLabel nameLabel = new JLabel("User Name:");
Now I want to I18N it. I will create a key for the info:
static String NAME_KEY = "NAME_KEY";
and i will have code for retrieving the proper text based on the key. but how do i put the retrieved text back into the code, without impact on the visual editing capability?
I am thinking of a post init process as a solution. but I'd like to here some advice first.
|
|
|
|
Re: Strategy for I18N [message #816197 is a reply to message #815740] |
Thu, 08 March 2012 14:41   |
Eclipse User |
|
|
|
Not really.
I've just checked, and found a section within the "features" heading. looks promising. Will go through it and see how that works.
Thanks a lot.
sma
|
|
|
Re: Strategy for I18N [message #816381 is a reply to message #816197] |
Thu, 08 March 2012 19:41   |
Eclipse User |
|
|
|
Ok. I tried the feature and it works. Now I have a different question.
My codebase has this weird structure for i18n:
/src
/i18n
the i18n folder contains all the message.properties files. for compatibility reason, I need to use this structure. the issue now is that, with WB, it can only see the /src folder as its source. Is there any way to enable the WB to see more? By the way, as you might have already guessed it, the /i18n is on the class path. it's just not visible to WB.
your help is very much appreciated.
sma
|
|
|
|
Powered by
FUDForum. Page generated in 0.03967 seconds