1

I use Eclipse Luna 4.4.2 using the "externalize strings" wizard (from right click on the class in the package explorer) it replaces my original strings by another string pointing to the key in the property file.

For example, having this label defined in a class "myFrame" :

JLabel mylabel = new JLabel("original text");

after the wizard the result is:

JLabel mylabel = new JLabel(Messages.getString("myFrame.1")

I would prefer a behavior where the key would be constructed by the component name. It is what happen if I use the other wizard from the windowbuilder view. But this wizard has less options (you can't set to ignore..) So this result would be better :

JLabel mylabel = new JLabel(Messages.getString("myFrame.mylabel.text")

or even something like

JLabel mylabel = new JLabel(Messages.myFrame_mylabel_text)

I spent a lot of time on searching and found this thread Configuring string externalization in Eclipse to use ${key} as field name but it is old and I do not have the checkbox "use Eclipe's externalization mechanism" ?!

Also this thread says that the features have been implemented inside Eclipse http://blog.vogella.com/2013/08/12/eclipse-internationalization-part-44-new-features-by-dirk-fauth/ Did I miss some updates ? I installed te latest build of Eclipse-Mars, but it does not help..

Thank you for help !

Community
  • 1
  • 1
fredygulzy
  • 11
  • 2
  • The Vogella blog is talking about Eclipse e4 style plugins and doesn't apply to ordinary Java programs since it relies on the e4 direct injection system. – greg-449 May 15 '16 at 20:06
  • Oh well, thanks for the input. – fredygulzy May 17 '16 at 05:33
  • I found anotherpost from 2012 that says that a predefined pattern may be applied to the key, but it didn't work : http://codebuild.blogspot.fr/2012/02/customized-internationalization-i18n-in.html – fredygulzy May 17 '16 at 05:34

0 Answers0