}
private void setLanguage() {
final String DEFAULT_LANGUAGE = "en";
ResourceBundles resBundle = ((ResourceBundles)Controller.getCurrentController().getResourceController().getResources());
String lang = resBundle.getLanguageCode();
if (lang == null || lang.equals(ResourceBundles.LANGUAGE_AUTOMATIC)) {
lang = DEFAULT_LANGUAGE;
}
URL res = this.getClass().getResource("/translations/Resources_"+lang+".properties");
if (res == null) {
lang = DEFAULT_LANGUAGE;
res = this.getClass().getResource("/translations/Resources_"+lang+".properties");
}
if (res == null) {
return;
}
resBundle.addResources(resBundle.getLanguageCode(), res);
}