LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1316|回复: 4

【求助】QT编程中,调用文件对话框类,如何使其界面中文化!

[复制链接]
发表于 2004-1-5 16:39:32 | 显示全部楼层 |阅读模式
谢谢各位指点!

这种实例化生成的widget都是英文的,如何使其界面中文化那?
发表于 2004-1-5 20:38:54 | 显示全部楼层
自己写po文件呗。可以看看qt帮助中关于“国际化”的部分。
发表于 2004-1-7 16:20:53 | 显示全部楼层
如果只是为了作练习,可以简化处理一下:
http://www.linuxsir.cn/forum.php?mod=viewthread&tid=45327
发表于 2004-1-8 10:07:31 | 显示全部楼层

Re

in your foo.pro file, add a line:
TRANSLATIONS = foo_zh.ts

in the source files, add tr() to every literal string that will appear on the gui.

lupdate foo.pro

use linguist to make the translation

use lrelease

in main.cpp, add a QTranslation object.
发表于 2004-1-9 12:07:05 | 显示全部楼层
如果你想把自己写的代码汉化
请参考
http://www.qiliang.net/qt/i18n.html

如果是想汉化qt库中的字符串
请使用
http://www.qiliang.net/qt_zh_CN.zip

good luck
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表