当前位置:网站首页>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.
边栏推荐
- Steve Jobs of the United States, died; China jobs, sold
- Flutter dart语言特点总结
- R language ggplot2 visualization: use the patchwork package to stack two ggplot2 visualization results vertically to form a composite diagram, and stack one visualization result on the other visualiza
- Facebook出手!自适应梯度打败人工调参
- SAP mts/ato/mto/eto topic 9: front and back desk operation in m+m mode, strategy 50, preparation of raw materials and semi-finished products in advance
- C语言学习-19-全排列
- C#/VB. Net to convert PDF to excel
- Experiment 6 8255 parallel interface experiment [microcomputer principle] [experiment]
- [C language] how to implement plural types
- 深度学习基础汇总
猜你喜欢

开源大咖说 - Linus 与 Jim 对话中国开源

完整的模型训练套路(一)

Grand launch of qodana: your favorite CI code quality platform

扩充C盘(将D盘的内存分给C盘)

【算法篇】刷了两道大厂面试题,含泪 ”重学数组“

go-zero 微服务实战系列(七、请求量这么高该如何优化)

Successful cases of rights protection of open source projects: successful rights protection of SPuG open source operation and maintenance platform

经典模型——Transformer

Practice of curve replacing CEPH in Netease cloud music

C语言基础语法
随机推荐
云杉网络DeepFlow帮助5G核心网和电信云构建可观测性
ROS knowledge points - ROS create workspace
SaaS application management platform solution in the education industry: help enterprises realize the integration of operation and management
R语言ggplot2可视化:使用patchwork包(直接使用加号+)将一个ggplot2可视化结果和一段文本内容横向组合起来形成最终结果图
Does Frankfurt currently support SQL?
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
实验6 8255并行接口实验【微机原理】【实验】
石油化工行业供应链系统驱动管理模式创新升级,强化企业内部管理
从莫高窟到太平洋,海量数据找到了新家园
R language ggplot2 visualization: the patchwork package horizontally combines a ggplot2 visualization result and a plot function visualization result to form a final result graph, aligns the two visua
使用Karmada实现Helm应用的跨集群部署
Privacy computing fat - offline prediction
How can the digital intelligent supply chain management platform of the smart Park optimize process management and drive the development of the park to increase speed and quality?
MongoDB 在腾讯零售优码中的应用
ROS21讲
How to solve the following problems in the Seata database?
当下不做元宇宙,就像20年前没买房!
叮!Techo Day 腾讯技术开放日如约而至!
[C language] how to generate normal or Gaussian random numbers
GBASE南大通用亮相第六届世界智能大会