german (only partly)

This commit is contained in:
Thomas
2023-05-10 22:25:12 +02:00
parent 4f82eb09d8
commit c7cbf1a9f3
3 changed files with 744 additions and 1 deletions

View File

@@ -5,6 +5,7 @@ import 'package:flutter/widgets.dart';
import 'package:flutter_localizations/flutter_localizations.dart';
import 'package:intl/intl.dart' as intl;
import 'l10n_de.dart';
import 'l10n_en.dart';
import 'l10n_zh.dart';
@@ -89,6 +90,7 @@ abstract class S {
/// A list of this localizations delegate's supported locales.
static const List<Locale> supportedLocales = <Locale>[
Locale('de'),
Locale('en'),
Locale('zh')
];
@@ -1135,7 +1137,7 @@ class _SDelegate extends LocalizationsDelegate<S> {
}
@override
bool isSupported(Locale locale) => <String>['en', 'zh'].contains(locale.languageCode);
bool isSupported(Locale locale) => <String>['de', 'en', 'zh'].contains(locale.languageCode);
@override
bool shouldReload(_SDelegate old) => false;
@@ -1146,6 +1148,7 @@ S lookupS(Locale locale) {
// Lookup logic when only language code is specified.
switch (locale.languageCode) {
case 'de': return SDe();
case 'en': return SEn();
case 'zh': return SZh();
}