m3_lightmeter/lib/data/models/supported_locale.dart

21 lines
534 B
Dart
Raw Normal View History

2025-03-17 15:57:55 +00:00
enum SupportedLocale { en, fr, ru, zh, de }
extension SupportedLocaleExtension on SupportedLocale {
String get intlName => toString().replaceAll("SupportedLocale.", "");
String get localizedName {
switch (this) {
case SupportedLocale.en:
return 'English';
2023-02-14 12:30:49 +00:00
case SupportedLocale.fr:
return 'Français';
case SupportedLocale.ru:
return 'Русский';
case SupportedLocale.zh:
return '简体中文';
2025-03-17 15:57:55 +00:00
case SupportedLocale.de:
return 'Deutsch';
}
}
}