This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Take a look at ResourceBundle. With it you can have one properties file per language (or even language / country combination). In your code you then shouldn't use hard coded strings but use this ResourceBundle instead. To make it easier you can provide one utility class to get all the messages. For example:
The method and key names are of course entirely dependent on your application.
Now, instead of creating a button with label "Submit", you create it with label I18N.getSubmitButtonLabel(). This will then take the actual label from the correct properties file, depending on the current locale.
Now other thing
For example, i have English as default language and i want to change it on another,let's say, French with Combobox. But as i have many labels and buttons i don't want to call "setText" to all of them.
Is it possible to avoid this callings?
Thanks a lot!