fix: lang

This commit is contained in:
hiddify-com
2024-05-31 16:29:27 +02:00
parent ec67534d13
commit da36c0c4c0

View File

@@ -1,14 +1,15 @@
import 'dart:io';
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 : FontFamily.emoji;
String get preferredFontFamily => this == AppLocale.fa ? FontFamily.shabnam : (Platform.isIOS || Platform.isMacOS ? "" : FontFamily.emoji);
String get localeName => switch (flutterLocale.toString()) {
"ar" => "العربية",
"en" => "English",
"fa" => "فارسی",
"ar" => "العربية",
"ru" => "Русский",
"zh" || "zh_CN" => "中文 (中国)",
"zh_TW" => "中文 (台湾)",