Examples of toLangtag()


Examples of com.sun.faces.util.LocaleBCP47.toLangtag()

        }
       
        String language = tag.getLanguage();
       
        //1. Both language and region(country) match
        if (localesStr.indexOf(tag.toLangtag() + DELIMITER) != -1)
            return new Locale(tag.getLanguage(), tag.getRegion());
       
        //2. Check only language
        if (localesStr.indexOf(language + DELIMITER) != -1)
            return new Locale(language);
View Full Code Here

Examples of com.sun.faces.util.LocaleBCP47.toLangtag()

        if (localesStr.indexOf(language + DELIMITER) != -1)
            return new Locale(language);
       
        //3. Handle fallback for Norwegian
        if (language.matches("n[nb]")) {
            if (localesStr.indexOf(tag.toLangtag("no") + DELIMITER) != -1) {
                return new Locale("no", tag.getRegion());
            }
            if (localesStr.indexOf("no" + DELIMITER) != -1) {
                return new Locale("no");
            }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.