/** * Setup locals for date and number parsing * - first add the specific user input if provided * - next add the Confluence global default * - next add all the other locales defined to Confluence * - Note that duplicates are removed by the chartData function */ void setupLocales(ChartData chartData, String language, String country) { if (!language.trim().equals("") || !country.trim().equals("")) { // is something specified, use it chartData.addLocale(new Locale(language, country)); } LocaleUtils localeUtils = new LocaleUtils(); chartData.addLocale(localeUtils.getLocale(settingsManager.getGlobalSettings().getGlobalDefaultLocale())); List<Language> list = languageManager.getLanguages(); //log.debug("installed languages: " + list.size()); list.forEach(item -> chartData.addLocale(item.getLocale())); }
Document xmlDoc = db.parse(url.openConnection().getInputStream()); Element root = xmlDoc.getDocumentElement(); String locale = getContainedText(root, LOCALE_TAG_NAME); if (!isEmpty(locale)) installedLocales.add(getLocale(locale));
String locale = XMLUtils.getContainedText(root, LOCALE_TAG_NAME); if (!Strings.nullToEmpty(locale).isEmpty()) { installedLocales.add(getLocale(locale)); } else { throw new IllegalArgumentException("The " + LOCALE_TAG_NAME + " element must be set in " + url);
localeList = new ArrayList<Locale>(super.getInstalledLocales()); for (Locale locale : localeList)