当前位置:网站首页>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
边栏推荐
- 补某视频网站的js,进行视频解密
- Solar insect killing system based on single chip microcomputer
- Penetration tool - sqlmap
- el-select如何实现懒加载(带搜索功能)
- Upper computer software development - log information is stored in the database based on log4net
- With the advent of the IP era, how can E-sports hotels take advantage of the "east wind" of games?
- VB.net GIF(制作、拆解——优化代码,类库——5)
- RSA加密应用常见缺陷的原理与实践
- Excel 比较日器
- "In simple language programming competition (basic)" part 1 Introduction to language Chapter 3 branch structure programming
猜你喜欢
空洞卷积、可变形卷积、可变形ROI Pooling
19. Framebuffer application programming
Analysis of classical pointer and array written test questions in C language
input显示当前选择的图片
How much computing power does transformer have
724. 寻找数组的中心下标
509. 斐波那契数、爬楼梯所有路径、爬楼梯最小花费
【微服务】Nacos集群搭建以及加载文件配置
Online shrimp music will be closed in January next year. Netizens call No
Zhanrui tankbang | jointly build, cooperate and win-win zhanrui core ecology
随机推荐
Analysis of classical pointer and array written test questions in C language
2022 R2 mobile pressure vessel filling retraining question bank and answers
Basic concept of bus
JS arguments parameter usage and explanation
Character types of C language
谷歌 Chrome 浏览器将支持选取文字翻译功能
Luogu deep foundation part 1 Introduction to language Chapter 5 array and data batch storage
Enterprise level log analysis system elk (if things backfire, there must be other arrangements)
JS string splicing
[paper summary] zero shot semantic segmentation
云原生架构实战案例及优化解决方案
HMS v1.0 appointment.php editid参数 SQL注入漏洞(CVE-2022-25491)
1480. 一维数组的动态和
Nodejs learning document
总线的基本概念
安装 Pytorch geometric
[microservice] Nacos cluster building and loading file configuration
fastjson
Solar insect killing system based on single chip microcomputer
js获取对象中嵌套的属性值