Files
umbrix/lib/core/localization/locale_extensions.dart

17 lines
477 B
Dart
Raw Normal View History

2023-12-01 12:56:24 +03:30
import 'package:hiddify/gen/fonts.gen.dart';
import 'package:hiddify/gen/translations.g.dart';
extension AppLocaleX on AppLocale {
String get preferredFontFamily =>
this == AppLocale.fa ? FontFamily.shabnam : "";
2023-12-14 16:07:46 +03:30
String get localeName => switch (flutterLocale.toString()) {
"en" => "English",
"fa" => "فارسی",
"ru" => "Русский",
"zh" || "zh_CN" => "中文",
"tr" => "Türkçe",
_ => "Unknown",
};
2023-12-01 12:56:24 +03:30
}