Search in sources :

Example 1 with Util.getLocaleFromString

use of com.sun.faces.util.Util.getLocaleFromString in project mojarra by eclipse-ee4j.

the class ApplicationConfigProcessor method addSupportedLocale.

private void addSupportedLocale(Application application, Node supportedLocale) {
    if (supportedLocale != null) {
        Set<Locale> sLocales = getCurrentLocales(application);
        String locString = getNodeText(supportedLocale);
        if (locString != null) {
            Locale loc = Util.getLocaleFromString(locString);
            if (loc != null) {
                LOGGER.log(Level.FINE, () -> format("Adding supported Locale ''{0}''", locString));
                sLocales.add(loc);
            }
            application.setSupportedLocales(sLocales);
        }
    }
}
Also used : Locale(java.util.Locale) Util.getLocaleFromString(com.sun.faces.util.Util.getLocaleFromString)

Aggregations

Util.getLocaleFromString (com.sun.faces.util.Util.getLocaleFromString)1 Locale (java.util.Locale)1