feat: 日本語 Support

This commit is contained in:
xkeyC 2024-04-11 20:04:07 +08:00
parent df54a44e0e
commit e302d9e927
2 changed files with 3 additions and 0 deletions

View File

@ -88,6 +88,7 @@ class AppGlobalModel extends _$AppGlobalModel {
const Locale("zh", "CN"): NoL10n.langZHS,
const Locale("zh", "TW"): NoL10n.langZHT,
const Locale("en"): NoL10n.langEn,
const Locale("ja"): NoL10n.langJa,
};
@override
@ -308,6 +309,7 @@ class AppGlobalModel extends _$AppGlobalModel {
final localeCode = value.countryCode != null
? "${value.languageCode}_${value.countryCode ?? ""}"
: value.languageCode;
dPrint("changeLocale == $value localeCode=== $localeCode");
await appConfBox.put("app_locale", localeCode);
state = state.copyWith(appLocale: value);
}

View File

@ -2,4 +2,5 @@ class NoL10n {
static const String langZHS = '简体中文';
static const String langZHT = '繁體中文';
static const String langEn = 'English';
static const String langJa = '日本語';
}