m3_lightmeter/lib/data/models/supported_locale.dart
ScaredCube bb9b023fa7
Add Chinese language support (#91)
* 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>
2023-07-24 09:35:30 +02:00

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 '简体中文';
}
}
}