更新法语语言包

This commit is contained in:
wyf
2026-01-31 14:43:47 +08:00
parent 2aedbb3d74
commit 97ffc1220d
48 changed files with 1608 additions and 1837 deletions

View File

@@ -121,6 +121,19 @@ class CityModelController extends GetControllerEx<CityModel> {
return jsonList.map((json) => CityModel.fromJson(json)).toList();
} catch (e) {
ef.log("_loadCityData 失败:$e");
String currentLanguageCode = "en_US";
// 根据当前语言代码构建文件名
final String fileName = 'assets/city/city_$currentLanguageCode.json';
// 读取对应语言的JSON文件
final String jsonString = await rootBundle.loadString(fileName);
// 解析JSON数据并转换为 CityModel 列表
final List<dynamic> jsonList = jsonDecode(jsonString);
// 将 Map 转换为 CityModel
return jsonList.map((json) => CityModel.fromJson(json)).toList();
return [];
}
}