Files
fcs/lib/localization/transalation.dart

28 lines
660 B
Dart
Raw Permalink Normal View History

2020-09-04 15:30:10 +06:30
import 'dart:ui';
typedef void LocaleChangeCallback(Locale locale);
class Translation {
static final Translation _translation = Translation._internal();
factory Translation() {
return _translation;
}
Translation._internal();
final List<String> supportedLanguages = [
"English",
"မြန်မာ ",
];
final List<String> supportedLanguagesCodes = ["en", "mu"];
//returns the list of supported Locales
Iterable<Locale> supportedLocales() =>
supportedLanguagesCodes.map<Locale>((language) => Locale(language, ""));
//function to be invoked when changing the language
2021-09-10 12:02:08 +06:30
late LocaleChangeCallback onLocaleChanged;
2020-09-04 15:30:10 +06:30
}