当前位置:网站首页>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.
边栏推荐
- 利用MySqlBulkLoader实现批量插入数据的示例详解
- 雷科防务:4D毫米波雷达产品预计可以在年底量产供货
- R语言使用nnet包的multinom函数构建无序多分类logistic回归模型、使用回归系数及其标准误计算每个系数对应的Z统计量的值
- [C language] how to generate normal or Gaussian random numbers
- 从莫高窟到太平洋,海量数据找到了新家园
- 华为能成“口红一哥”,或者“带货女王”吗?
- ROS知识点——ROS创建工作空间
- Facebook! Adaptive gradient defeats manual parameter adjustment
- R语言ggplot2可视化:使用patchwork包(直接使用加号+)将一个ggplot2可视化结果和一个plot函数可视化结果横向组合起来形成最终结果图、将两个可视的组合结果对齐
- Li Kou today's question -522 Longest special sequence
猜你喜欢
扩充C盘(将D盘的内存分给C盘)
Gbase Nantah General Motors appears at the 6th World Intelligence Conference
美国乔布斯,殁了;中国乔布斯,卖了
Power battery is divided up like this
Go zero micro Service Practice Series (VII. How to optimize such a high demand)
PostgreSQL实现按年、月、日、周、时、分、秒的分组统计
Fleet |「後臺探秘」第 3 期:狀態管理
Application of mongodb in Tencent retail premium code
Yiwen teaches you to quickly generate MySQL database diagram
教育行业SaaS应用管理平台解决方案:助力企业实现经营、管理一体化
随机推荐
ROS21讲
完整的模型训练套路(一)
如何从零搭建10万级 QPS 大流量、高并发优惠券系统
R language ggplot2 visualization: use the patchwork package (directly use the plus sign +) to horizontally combine a ggplot2 visualization result and a piece of text content to form a final result gra
Not being a meta universe now is like not buying a house 20 years ago!
Experiment 6 8255 parallel interface experiment [microcomputer principle] [experiment]
Fleet |「后台探秘」第 3 期:状态管理
WPF 视频硬解码渲染播放(无空域)(支持4K、8K、高帧率视频)
ROS knowledge points - ROS create workspace
Ros21 lecture
halcon 基础总结(一)裁切图片并旋转图像
Cross cluster deployment of helm applications using karmada
Analysis of PostgreSQL storage structure
分布式 CAP 定理的前世今生
成龙和快品牌,谁才是快手的救星?
GCC efficient graph revolution for joint node representationlearning and clustering
MIPS汇编语言学习-01-两数求和以及环境配置、如何运行
New offline retail stores take off against the trend, and consumption enthusiasm under the dark cloud of inflation
Power battery is divided up like this
验证回文串