/** * get the available Locales for the User Interface as defined in dspace.cfg * property xmlui.supported.locales * returns an array of Locales or null * * @return an array of supported Locales or null */ private static Locale[] getSupportedLocales() { String ll = ConfigurationManager.getProperty("xmlui.supported.locales"); if (ll != null) { return I18nUtil.parseLocales(ll); } else { Locale result[] = new Locale[1]; result[0] = I18nUtil.DEFAULTLOCALE; return result; } } }
/** * get the available Locales for the User Interface as defined in dspace.cfg * returns an array of Locales or null * * @return an array of supported Locales or null */ public static Locale[] getSupportedLocales() { ConfigurationService config = DSpaceServicesFactory.getInstance().getConfigurationService(); String[] locales = config.getArrayProperty("webui.supported.locales"); if (locales != null && locales.length > 0) { return parseLocales(locales); } else { Locale[] availableLocales = new Locale[1]; availableLocales[0] = DEFAULTLOCALE; return availableLocales; } }