From b97e77a4f8530d68321a3d3dda99fdad8e55bd0a Mon Sep 17 00:00:00 2001 From: Neeraj Gupta <254676+ua741@users.noreply.github.com> Date: Tue, 25 Mar 2025 10:17:14 +0530 Subject: [PATCH] [auth] Support both Chinese Simplified and Traditional --- auth/lib/locale.dart | 1 + auth/lib/ui/settings/language_picker.dart | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/auth/lib/locale.dart b/auth/lib/locale.dart index 94d9ea4a8d..b1bfbb5e56 100644 --- a/auth/lib/locale.dart +++ b/auth/lib/locale.dart @@ -32,6 +32,7 @@ const List appSupportedLocales = [ Locale('uk'), Locale('vi'), Locale("zh", "CN"), + Locale("zh", "TW"), ]; Locale? autoDetectedLocale; diff --git a/auth/lib/ui/settings/language_picker.dart b/auth/lib/ui/settings/language_picker.dart index add1891b9d..900a81ecc8 100644 --- a/auth/lib/ui/settings/language_picker.dart +++ b/auth/lib/ui/settings/language_picker.dart @@ -181,6 +181,13 @@ class _ItemsWidgetState extends State { case 'fi': return 'Suomi'; case 'zh': + if (locale.countryCode == 'TW') { + return '中文 (台灣)'; + } else if (locale.countryCode == 'HK') { + return '中文 (香港)'; + } else if (locale.countryCode == 'CN') { + return '中文 (中国)'; + } switch (locale.scriptCode) { case 'Hans': return '中文 (简体)';