diff --git a/trunk/build.xml b/trunk/build.xml index 77a2dbc73..85d189b6c 100644 --- a/trunk/build.xml +++ b/trunk/build.xml @@ -2,8 +2,8 @@ Builds project FFDec - - + + diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/Main.java b/trunk/src/com/jpexs/decompiler/flash/gui/Main.java index 7bb6ce5e8..544f5d38e 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/Main.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/Main.java @@ -462,7 +462,9 @@ public class Main { } public static void initLang() { - Locale.setDefault(Locale.forLanguageTag((String) Configuration.getConfig("locale", Locale.getDefault()))); + if (Configuration.containsConfig("locale")) { + Locale.setDefault(Locale.forLanguageTag((String) Configuration.getConfig("locale", "en"))); + } UIManager.put("OptionPane.okButtonText", AppStrings.translate("button.ok")); UIManager.put("OptionPane.yesButtonText", AppStrings.translate("button.yes")); UIManager.put("OptionPane.noButtonText", AppStrings.translate("button.no")); @@ -521,14 +523,6 @@ public class Main { public static void main(String[] args) throws IOException { loadProperties(); Configuration.loadFromFile(getConfigFile(), getReplacementsFile()); - initLang(); - View.setLookAndFeel(); - if ((Boolean) Configuration.getConfig("cacheOnDisk", Boolean.TRUE)) { - Cache.setStorageType(Cache.STORAGE_FILES); - } else { - Cache.setStorageType(Cache.STORAGE_MEMORY); - } - int pos = 0; if (args.length > 0) { if (args[0].equals("-debug")) { @@ -537,6 +531,15 @@ public class Main { } } initLogging(Configuration.debugMode); + + initLang(); + View.setLookAndFeel(); + if ((Boolean) Configuration.getConfig("cacheOnDisk", Boolean.TRUE)) { + Cache.setStorageType(Cache.STORAGE_FILES); + } else { + Cache.setStorageType(Cache.STORAGE_MEMORY); + } + if (args.length < pos + 1) { autoCheckForUpdates(); offerAssociation();