当前位置:网站首页>Qt发布多语言国际化翻译
Qt发布多语言国际化翻译
2022-07-04 05:32:00 【csdn_zhangchunfeng】
在使用Qt进行项目开发的过程中,有时需要发布多语言国际化版本,本文大致介绍使用Qt自身工具达到国际化翻译目的的步骤。
一 修改pro
在pro中添加
TRANSLATIONS = my_project.ts
二 调整代码
如果在.h、.cpp中可把要翻译的语句添加
tr("TEXT")
如果在qml中要把翻译的语句添加
qsTr("TEXT")
三 lupdate
/*产生相对应的ts文件*/
lupdate my_project_name四 linguist
/*打开翻译语言工具,处理翻译细节,生成对应的qm文件*/
linguist my_project.ts五 lrelease
/*发布多语言翻译*/
lrelease my_project.ts -qm my_project.qm边栏推荐
- LabVIEW错误对话框的出现
- With the advent of the IP era, how can E-sports hotels take advantage of the "east wind" of games?
- 配置交叉编译工具链和环境变量
- 19.Frambuffer应用编程
- Introduction to AMBA
- JS扁平化数形结构的数组
- 2022 a special equipment related management (elevator) examination questions simulation examination platform operation
- Redis realizes ranking function
- VB.net GIF(制作、拆解——优化代码,类库——5)
- ANSYS command
猜你喜欢

VB. Net GIF (making and disassembling - optimizing code, class library - 5)

空洞卷积、可变形卷积、可变形ROI Pooling

Zhanrui tankbang | jointly build, cooperate and win-win zhanrui core ecology

BUU-Pwn-test_ your_ nc

补某视频网站的js,进行视频解密

BUU-Reverse-easyre

19.Frambuffer应用编程

如何展开Collapse 的所有折叠面板

【微服务】Nacos集群搭建以及加载文件配置

拓扑排序和关键路径的图形化显示
随机推荐
Flask
Excel comparator
[high concurrency, high performance and high availability of massive data MySQL practice-7] - memory data drop disk
Install pytoch geometric
云原生架构实战案例及优化解决方案
Thinkphp6.0 middleware with limited access frequency think throttle
Redis realizes ranking function
[microservice] Nacos cluster building and loading file configuration
Talk about the SQL server version of DTM sub transaction barrier function
left_ and_ right_ Net normal version
Basic concept of bus
拓扑排序和关键路径的图形化显示
检漏继电器JY82-2P
BeanFactoryPostProcessor 与 BeanPostProcessor 相关子类概述
VB.net 简单的处理图片,黑白(类库——7)
十二. golang其他
[Excel] 数据透视图
BUU-Crypto-[GUET-CTF2019]BabyRSA
一键过滤选择百度网盘文件
1480. Dynamic sum of one-dimensional array