mirror of
https://github.com/vodemn/m3_lightmeter.git
synced 2024-11-23 07:50:42 +00:00
bb9b023fa7
* Add Chinese language support * Update intl_cn.arb * Fixed some bugs * Add Chinese language support * renamed `cn` to `zh` --------- Co-authored-by: Vadim <44135514+vodemn@users.noreply.github.com> Co-authored-by: Vadim <vadim.turko@gmail.com>
18 lines
473 B
Dart
18 lines
473 B
Dart
enum SupportedLocale { en, fr, ru, zh }
|
|
|
|
extension SupportedLocaleExtension on SupportedLocale {
|
|
String get intlName => toString().replaceAll("SupportedLocale.", "");
|
|
|
|
String get localizedName {
|
|
switch (this) {
|
|
case SupportedLocale.en:
|
|
return 'English';
|
|
case SupportedLocale.fr:
|
|
return 'Français';
|
|
case SupportedLocale.ru:
|
|
return 'Русский';
|
|
case SupportedLocale.zh:
|
|
return '简体中文';
|
|
}
|
|
}
|
|
}
|