@Override public Locale getLocale() { if (this.locale == null) { File configFile = new File(StringUtil.cleanFileName(Settings.get(this.INSTALLATION_DIRECTORY) + "/WTF/Config.wtf")); if (configFile.exists()) { String line; try (Scanner in = new Scanner(configFile)) { while (in.hasNextLine()) { line = in.nextLine(); if (line.contains("SET locale")) { this.locale = line.replaceAll("SET locale", "").trim().replaceAll("\"", "").equalsIgnoreCase("enUS") ? Locale.US : Locale.EU; } } } catch (FileNotFoundException e) { e.printStackTrace(); } } } return this.locale; }