mirror of
https://github.com/wgh136/pixes.git
synced 2025-09-27 12:57:24 +00:00
Initial commit
This commit is contained in:
14
lib/utils/translation.dart
Normal file
14
lib/utils/translation.dart
Normal file
@@ -0,0 +1,14 @@
|
||||
import 'package:pixes/foundation/app.dart';
|
||||
|
||||
extension Translation on String {
|
||||
String get tl {
|
||||
var locale = App.locale;
|
||||
return translation["${locale.languageCode}_${locale.countryCode}"]?[this] ??
|
||||
this;
|
||||
}
|
||||
|
||||
static const translation = <String, Map<String, String>>{
|
||||
"zh_CN": {},
|
||||
"zh_TW": {},
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user