当前位置:网站首页>Flutter simply implements multilingual internationalization
Flutter simply implements multilingual internationalization
2022-06-28 15:23:00 【Bright like water】
Preface
Recent foreign projects , Of course, internationalization cannot be avoided , Here is how to simply implement internationalization .
One 、 Introducing plug-ins
flutter_localizations:
sdk: flutter

Two 、 Join in intl Tools

Click on initialize for the project After that, the following directories are generated :
You can also click Add Locale Add other languages .
3、 ... and 、 stay main File configuration

localizationsDelegates: const [
S.delegate,
GlobalMaterialLocalizations.delegate,
GlobalWidgetsLocalizations.delegate,
GlobalCupertinoLocalizations.delegate,
],
supportedLocales: [...S.delegate.supportedLocales],
locale: const Locale('zh', 'TW'),
This simply adds the internationalization configuration .
Four 、 Use
Select the text you want to internationalize , Hold down option + Enter key , The window will pop up as follows :
Choose Extract to ARB file
And then in String key Write your name , then OK The corresponding... Is automatically generated key. As shown in the figure :
END.
边栏推荐
- go-zero 微服务实战系列(七、请求量这么高该如何优化)
- 化学制品制造业智慧供应商管理系统深度挖掘供应商管理领域,提升供应链协同
- Halcon basic summary (I) cutting pictures and rotating images
- R语言ggplot2可视化:使用patchwork包将3个ggplot2可视化结果自定义组合起来构成组合图、两个子图横向组合后和另外一个图纵向组合构成最终组合图
- 教育行业SaaS应用管理平台解决方案:助力企业实现经营、管理一体化
- New offline retail stores take off against the trend, and consumption enthusiasm under the dark cloud of inflation
- 美国乔布斯,殁了;中国乔布斯,卖了
- Talking about open source - Linus and Jim talk about open source in China
- Facebook! Adaptive gradient defeats manual parameter adjustment
- ROS knowledge points - ROS create workspace
猜你喜欢

实验6 8255并行接口实验【微机原理】【实验】

隐私计算 FATE - 离线预测

Facebook! Adaptive gradient defeats manual parameter adjustment

Privacy computing fat - offline prediction

Application of mongodb in Tencent retail premium code
Oracle11g数据库使用expdp每周进行数据备份并上传到备份服务器

Leetcode 705. Design hash collection

动力电池,是这样被“瓜分”的

PostgreSQL 存储结构浅析

Technical secrets of ByteDance data platform: implementation and optimization of complex query based on Clickhouse
随机推荐
Grand launch of qodana: your favorite CI code quality platform
SQL statement exercises
openGauss内核:SQL解析过程分析
How does Seata server 1.5.0 support mysql8.0?
浪潮网络步步为赢
字节跳动数据平台技术揭秘:基于 ClickHouse 的复杂查询实现与优化
Longest continuous sequence
R语言ggplot2可视化:使用patchwork包将两个ggplot2可视化结果纵向堆叠起来(stacking)形成组合图、一个可视化结果堆叠在另外一个可视化结果上
Li Kou today's question -522 Longest special sequence
Case driven: a detailed guide from getting started to mastering shell programming
ROS知识点——ROS创建工作空间
ROS knowledge points - ROS create workspace
MIPS汇编语言学习-02-逻辑判断-前台输入
A bug liver a week I can't help mentioning issue
云杉网络DeepFlow帮助5G核心网和电信云构建可观测性
WSUS客户端访问服务端异常报错-0x8024401f「建议收藏」
Could you tell me whether the batch addition of Oracle such as insert all was not blocked?
Leetcode 705. Design hash collection
Steve Jobs of the United States, died; China jobs, sold
一个bug肝一周...忍不住提了issue