m3_lightmeter/lib/data/models/supported_locale.dart

17 lines
407 B
Dart
Raw Normal View History

2023-02-14 12:30:49 +00:00
enum SupportedLocale { en, fr, ru }
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 'Русский';
}
}
}