当前位置:网站首页>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边栏推荐
- BUU-Crypto-[HDCTF2019]basic rsa
- 724. Find the central subscript of the array
- Enterprise level log analysis system elk (if things backfire, there must be other arrangements)
- BUU-Crypto-Cipher
- Descriptive analysis of data distribution characteristics (data exploration)
- left_ and_ right_ Net interpretable design
- Leetcode 184 Employees with the highest wages in the Department (July 3, 2022)
- Signification des lettres du module optique et abréviation des paramètres Daquan
- VB. Net GIF (making and disassembling - optimizing code, class library - 5)
- [excel] PivotChart
猜你喜欢

509. 斐波那契数、爬楼梯所有路径、爬楼梯最小花费

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

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

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

Steady! Huawei micro certification Huawei cloud computing service practice is stable!

transformer坑了多少算力

卸载Google Drive 硬盘-必须退出程序才能卸载

Void convolution, deformable convolution, deformable ROI pooling

724. 寻找数组的中心下标

js arguments参数使用和详解
随机推荐
【雕爷学编程】Arduino动手做(105)---压电陶瓷振动模块
"In simple language programming competition (basic)" part 1 Introduction to language Chapter 3 branch structure programming
[high concurrency, high performance and high availability of massive data MySQL practice-7] - memory data drop disk
Write a complete answer applet (including single choice questions, judgment questions and multiple topics) (III) single choice questions, judgment questions, and the first question display
BUU-Pwn-test_ your_ nc
如何展开Collapse 的所有折叠面板
JS string splicing
拓扑排序和关键路径的图形化显示
left_ and_ right_ Net interpretable design
Zhanrui tankbang | jointly build, cooperate and win-win zhanrui core ecology
力扣(LeetCode)184. 部门工资最高的员工(2022.07.03)
JS string splicing enhancement
Easy change
VB. Net simple processing pictures, black and white (class library - 7)
Talk about the SQL server version of DTM sub transaction barrier function
基于单片机的太阳能杀虫系统
C language simple student management system (including source code)
c语言经典指针和数组笔试题解析
Excel 比较日器
How to use postman to realize simple interface Association [add, delete, modify and query]