Package com.groovesquid.model

Examples of com.groovesquid.model.Language


        }
        worker.execute();
    }
       
    public static String getLocaleString(String localeName) {
        Language currentLanguage;
        if(languages.containsKey(config.getLocale())) {
            currentLanguage = languages.get(config.getLocale());
        } else {
            // default language
            currentLanguage = languages.get("en_US");
        }
        if(currentLanguage.getResourceBundle().containsKey(localeName)) {
            return currentLanguage.getResourceBundle().getString(localeName);
        } else if(languages.get("en_US").getResourceBundle().containsKey(localeName)) {
            return languages.get("en_US").getResourceBundle().getString(localeName);
        } else {
            return localeName;
        }
View Full Code Here


    private static Map<String, Language> loadLanguages() {
        Map<String, Language> hm = new LinkedHashMap<String, Language>();
       
        try {
            hm.put("en_US", new Language("en_US"));
            hm.put("de_DE", new Language("de_DE"));
            hm.put("fr_FR", new Language("fr_FR"));
            hm.put("es_ES", new Language("es_ES"));
            hm.put("it_IT", new Language("it_IT"));
            hm.put("tr_TR", new Language("tr_TR"));
            hm.put("se_SE", new Language("se_SE"));
            hm.put("ru_RU", new Language("ru_RU"));
            hm.put("pl_PL", new Language("pl_PL"));
            hm.put("nl_BE", new Language("nl_BE"));
            hm.put("el_GR", new Language("el_GR"));
            hm.put("sr_LATN_RS", new Language("sr_LATN_RS"));
            hm.put("sr_RS", new Language("sr_RS"));
            hm.put("pt_PT", new Language("pt_PT"));
            hm.put("pt_BR", new Language("pt_BR"));
        } catch (Exception ex) {
            log.log(Level.SEVERE, null, ex);
        }
       
        return hm;
View Full Code Here

TOP

Related Classes of com.groovesquid.model.Language

Copyright © 2018 www.massapicom. 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.