当前位置:网站首页>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
边栏推荐
- [microservice] Nacos cluster building and loading file configuration
- Halcon图片标定,使得后续图片处理过后变成与模板图片一样
- ping端口神器psping
- SQL injection - injection based on MSSQL (SQL Server)
- Ping port artifact psping
- BUU-Crypto-[GUET-CTF2019]BabyRSA
- Analysis of classical pointer and array written test questions in C language
- Character types of C language
- VB. Net simple processing pictures, black and white (class library - 7)
- C语言简易学生管理系统(含源码)
猜你喜欢
随机推荐
FreeRTOS 中 RISC-V-Qemu-virt_GCC 的 锁机制 分析
JS string splicing enhancement
19.Frambuffer应用编程
冲击继电器JC-7/11/DC110V
LM small programmable controller software (based on CoDeSys) note 22: error 4268/4052
BUU-Crypto-[GXYCTF2019]CheckIn
空洞卷积、可变形卷积、可变形ROI Pooling
[Excel] 数据透视图
[QT] create mycombobox click event
卸载Google Drive 硬盘-必须退出程序才能卸载
Supplement the JS of a video website to decrypt the video
2022 R2 mobile pressure vessel filling retraining question bank and answers
Risc-v-qemu-virt in FreeRTOS_ Lock mechanism analysis of GCC
Halcon image calibration enables subsequent image processing to become the same as the template image
How to clone objects
Accidentally deleted the data file of Clickhouse, can it be restored?
"In simple language programming competition (basic)" part 1 Introduction to language Chapter 3 branch structure programming
Arc135 a (time complexity analysis)
每周小结(*63):关于正能量
tutle时钟改进版