/** * Gest a {@link java.util.Locale} with the specified locale string. * * @param localeString the specified locale string * @return locale */ public static Locale getLocale(final String localeString) { final String language = getLanguage(localeString); final String country = getCountry(localeString); // // XXX: variant return new Locale(language, country); } }
/** * Gets a value from {@link org.b3log.latke.Latkes#getLocale() the current locale} specified language properties * file with the specified key. * * @param key the specified key * @return value */ public String get(final String key) { return get(Keys.LANGUAGE, key, Locales.getLocale()); }
language = getLanguage(languageHeader); country = getCountry(languageHeader); if (!hasLocale(locale)) {
language = getLanguage(languageHeader); country = getCountry(languageHeader); if (!hasLocale(locale)) {
/** * Gest a {@link java.util.Locale} with the specified locale string. * * @param localeString the specified locale string * @return locale */ public static Locale getLocale(final String localeString) { final String language = getLanguage(localeString); final String country = getCountry(localeString); // // XXX: variant return new Locale(language, country); } }
/** * Gets a value from {@link org.b3log.latke.Latkes#getLocale() the current locale} specified language properties * file with the specified key. * * @param key the specified key * @return value */ public String get(final String key) { return get(Keys.LANGUAGE, key, Locales.getLocale()); }