Firstly, in the appropriate handler (for example, onAction to select the ComboBox language) you need to update the Locale, for example:
Locale.setDefault(new Locale(language, country));
where you set the values for language and country accordingly.
Then in the corresponding view controller you need to update, install your package:
bundle = ResourceBundle.getBundle("resources.bundles.SDBundle", Locale.getDefault());
(replace the String parameter in the above command with the path to your batch file).
Finally, (still in your view controller that needs to be updated), you start updating each gui element, for example.
myLabel.setText(bundle.getString("myLabel"));
This, of course, requires some template for working with package files, etc. and corresponding mapping between keys and values. Check out this great example.
I used the above approach in combination with a properties file, where the language and country values are stored every time they change, so that the application remembers the last choice every time it starts.
source share