当前位置:网站首页>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
边栏推荐
- Kubernets first meeting
- 配置交叉编译工具链和环境变量
- 力扣(LeetCode)184. 部门工资最高的员工(2022.07.03)
- 总线的基本概念
- SQL injection - injection based on MSSQL (SQL Server)
- Topological sorting and graphical display of critical path
- Ping port artifact psping
- left_and_right_net正常版本
- 云原生架构实战案例及优化解决方案
- [wechat applet] template and configuration (wxml, wxss, global and page configuration, network data request)
猜你喜欢
How to configure static IP for Kali virtual machine
Etcd database source code analysis - initialization overview
[wechat applet] template and configuration (wxml, wxss, global and page configuration, network data request)
冲击继电器JC-7/11/DC110V
ansys命令
BUU-Pwn-test_ your_ nc
Flask
C # character similarity comparison general class
云原生架构实战案例及优化解决方案
input显示当前选择的图片
随机推荐
left_ and_ right_ Net interpretable design
left_and_right_net正常版本
Risc-v-qemu-virt in FreeRTOS_ Lock mechanism analysis of GCC
[interested reading] advantageous filtering modeling on long term user behavior sequences for click through rate pre
Google Chrome browser will support the function of selecting text translation
空洞卷积、可变形卷积、可变形ROI Pooling
Arc135 C (the proof is not very clear)
What is MQ?
云原生架构实战案例及优化解决方案
基于单片机的太阳能杀虫系统
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
Take you to quickly learn how to use qsort and simulate qsort
fastjson
Viewing and using binary log of MySQL
Tutle clock improved version
[wechat applet] template and configuration (wxml, wxss, global and page configuration, network data request)
(4) Canal multi instance use
js获取对象中嵌套的属性值
JS arguments parameter usage and explanation
Halcon image calibration enables subsequent image processing to become the same as the template image