mirror of
https://github.com/GopeedLab/gopeed.git
synced 2026-11-18 14:23:42 +00:00
fix: include Japanese
This commit is contained in:
1 parent
adc7c7766d
commit
6c3553805e
1 file changed
+13
@@ -0,0 +1,13 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
Locale toLocale(String key) {
|
||||||
|
final arr = key.split('_');
|
||||||
|
return Locale(arr[0], arr[1]);
|
||||||
|
}
|
||||||
|
|
||||||
|
String getLocaleKey(Locale locale) {
|
||||||
|
return '${locale.languageCode}_${locale.countryCode}';
|
||||||
|
}
|
||||||
|
|
||||||
|
const debugLocale = Locale('zh', 'CN');
|
||||||
|
const fallbackLocale = Locale('en', 'US');
|
||||||
Reference in new issue
Block a user