Can now set UI lang in config file
This commit is contained in:
parent
1fe3f10be7
commit
00696c3450
@ -578,6 +578,11 @@ public class Utils {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static ResourceBundle getResourceBundle() {
|
public static ResourceBundle getResourceBundle() {
|
||||||
|
if (!getConfigString("lang", "").equals("")) {
|
||||||
|
String[] langCode = getConfigString("lang", "").split("_");
|
||||||
|
logger.info("Setting locale to " + getConfigString("lang", ""));
|
||||||
|
return ResourceBundle.getBundle("LabelsBundle", new Locale(langCode[0], langCode[1]), new UTF8Control());
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
ResourceBundle rb = ResourceBundle.getBundle("LabelsBundle", Locale.getDefault(), new UTF8Control());
|
ResourceBundle rb = ResourceBundle.getBundle("LabelsBundle", Locale.getDefault(), new UTF8Control());
|
||||||
return rb;
|
return rb;
|
||||||
|
Loading…
Reference in New Issue
Block a user