feat(lang): ja_JP.
This commit is contained in:
@@ -65,6 +65,11 @@ public final class Locales {
|
|||||||
*/
|
*/
|
||||||
public static final SupportedLocale RU = new SupportedLocale(new Locale("ru"));
|
public static final SupportedLocale RU = new SupportedLocale(new Locale("ru"));
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Japanese
|
||||||
|
*/
|
||||||
|
public static final SupportedLocale JA_JP = new SupportedLocale(Locale.JAPAN);
|
||||||
|
|
||||||
public static final List<SupportedLocale> LOCALES = Lang.immutableListOf(DEFAULT, EN, ZH_CN, ZH, ES, RU);
|
public static final List<SupportedLocale> LOCALES = Lang.immutableListOf(DEFAULT, EN, ZH_CN, ZH, ES, RU);
|
||||||
|
|
||||||
public static SupportedLocale getLocaleByName(String name) {
|
public static SupportedLocale getLocaleByName(String name) {
|
||||||
@@ -80,6 +85,8 @@ public final class Locales {
|
|||||||
return ES;
|
return ES;
|
||||||
case "ru":
|
case "ru":
|
||||||
return RU;
|
return RU;
|
||||||
|
case "ja_jp":
|
||||||
|
return JA_JP;
|
||||||
default:
|
default:
|
||||||
return DEFAULT;
|
return DEFAULT;
|
||||||
}
|
}
|
||||||
@@ -91,6 +98,7 @@ public final class Locales {
|
|||||||
else if (locale == ZH_CN) return "zh_CN";
|
else if (locale == ZH_CN) return "zh_CN";
|
||||||
else if (locale == ES) return "es";
|
else if (locale == ES) return "es";
|
||||||
else if (locale == RU) return "ru";
|
else if (locale == RU) return "ru";
|
||||||
|
else if (locale == JA_JP) return "ja_JP";
|
||||||
else if (locale == DEFAULT) return "def";
|
else if (locale == DEFAULT) return "def";
|
||||||
else throw new IllegalArgumentException("Unknown locale: " + locale);
|
else throw new IllegalArgumentException("Unknown locale: " + locale);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user