[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform.rcp] Re: Internationalization RCP app

Folks,

Shouldn't you be using OSGi's NLS class for getting the text for labels and buttons? There was a similar post in UA group too. Please refer. Also visit http://www.eclipse.org/babel.

Using properties is risky as it gives MissingResourceException. NLS has several advantages.

1. It is equivalent to declaring constants.
2. It substitutes the value with a default if the key is not defined in properties
3. It warns us to eliminate unnecessary keys in properties file


I cannot locate a suitable example in google. NLS class takes the default locate and looks for proper properties file. It goes in the same order as ResourceBundle. Look at private static String[] buildVariants(String root) in NLS.