mirror of
https://gitlab.com/nkming2/nc-photos.git
synced 2025-01-22 16:56:19 +01:00
Enable zh translation
This commit is contained in:
parent
d6c980c917
commit
0d34625fac
2 changed files with 14 additions and 0 deletions
|
@ -17,6 +17,16 @@ final supportedLanguages = {
|
|||
_AppLanguageEnum.systemDefault.index: AppLanguage(
|
||||
_AppLanguageEnum.systemDefault.index, "System default", null, null),
|
||||
// sorted by alphabetic order of their ISO language names
|
||||
_AppLanguageEnum.chineseHans.index: AppLanguage(
|
||||
_AppLanguageEnum.chineseHans.index,
|
||||
"中文 (简体)",
|
||||
"Chinese (Simplified)",
|
||||
const Locale.fromSubtags(languageCode: "zh", scriptCode: "Hans")),
|
||||
_AppLanguageEnum.chineseHant.index: AppLanguage(
|
||||
_AppLanguageEnum.chineseHant.index,
|
||||
"中文 (繁體/正體)",
|
||||
"Chinese (Traditional)",
|
||||
const Locale.fromSubtags(languageCode: "zh", scriptCode: "Hant")),
|
||||
_AppLanguageEnum.czech.index: AppLanguage(
|
||||
_AppLanguageEnum.czech.index, "čeština", "Czech", const Locale("cs")),
|
||||
_AppLanguageEnum.english.index: AppLanguage(
|
||||
|
@ -52,6 +62,8 @@ enum _AppLanguageEnum {
|
|||
finnish,
|
||||
polish,
|
||||
portuguese,
|
||||
chineseHans,
|
||||
chineseHant,
|
||||
}
|
||||
|
||||
AppLanguage _getSelectedLanguage() {
|
||||
|
|
|
@ -97,6 +97,8 @@ class _MyAppState extends State<MyApp>
|
|||
Locale("fi"),
|
||||
Locale("pl"),
|
||||
Locale("pt"),
|
||||
Locale.fromSubtags(languageCode: "zh", scriptCode: "Hans"),
|
||||
Locale.fromSubtags(languageCode: "zh", scriptCode: "Hant"),
|
||||
],
|
||||
builder: (context, child) {
|
||||
MyApp._globalContext = context;
|
||||
|
|
Loading…
Reference in a new issue