private void loadLabels() { LocaleSuffix[] locales = getLocaleSuffixes(); for (LocaleSuffix locale : locales) { try { Properties currentLocaleLabels = new Properties(loadedLabels); InputStream inputStream = getLocaleStream(locale); if (inputStream == null) { throw new IOException(); } currentLocaleLabels.load(new InputStreamReader(inputStream, "UTF-8")); loadedLabels = currentLocaleLabels; // Store the most dominant locale found. usedLocale = locale.getLocale(); } catch (IOException e) { System.err.println("Warning: Could not load " + locale + ". Falling back to next file."); } } }