m3_lightmeter/lib/data/models/supported_locale.dart
Linus von Drenkmann f0110e0edf
Add German translation (#222)
* l10n: add German translation

* l10n: add German to supported locales

* l10n(german): improve translation of "none"

* l10n(german): change about title

* style: alphabetical sorting of languages
2025-03-22 11:23:18 +01:00

20 lines
534 B
Dart

enum SupportedLocale { de, en, fr, ru, zh }
extension SupportedLocaleExtension on SupportedLocale {
String get intlName => toString().replaceAll("SupportedLocale.", "");
String get localizedName {
switch (this) {
case SupportedLocale.de:
return 'Deutsch';
case SupportedLocale.en:
return 'English';
case SupportedLocale.fr:
return 'Français';
case SupportedLocale.ru:
return 'Русский';
case SupportedLocale.zh:
return '简体中文';
}
}
}