1
0
mirror of https://github.com/RipMeApp/ripme.git synced 2025-07-31 02:50:15 +02:00

Can now set UI lang in config file

This commit is contained in:
cyian-1756
2018-05-13 08:56:14 -04:00
parent 1fe3f10be7
commit 00696c3450

View File

@@ -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;