以其他语言运行Qt应用程序? [英] Run a Qt app in a different language?

查看:62
本文介绍了以其他语言运行Qt应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在处理曾经是KDE应用程序的Qt应用程序.在过去,我只需要使用以下语法:

I'm working on a Qt application that used to be a KDE application. In the old days, I just had to use some syntax like:

KDELANG=de ./my_app

该命令使用德语运行my_app,并且仅运行my_app.可能不是KDELANG,但这是一些环境变量.

That ran my_app in German, and only my_app. It might not have been KDELANG, but it was some environment variable like that.

我花了很多时间试图从Google哄骗这个答案,我放弃了.必须有某种方法可以以其他某种语言运行Qt(如果需要的话,则为4.5)应用程序,而无需切换整个语言环境就可以到达那里.

I've spent a ridiculous amount of time trying to coax this answer out of Google, and I give up. There must be some way to run a Qt (4.5 if that matters) application in some other language without switching over my entire locale to get there.

推荐答案

我在KDE游戏Kolf和

I tried it with the KDE game Kolf and

(export LANG=de_DE.UTF-8; kolf)
(export LANG=en_US.UTF-8; kolf)

帮我把它转换成德语或英语的诀窍.

did the trick for me to switch it into German or English.

我通过qtparted的QT应用程序进行了验证

I verified it with the QT application qtparted

(export LANG=de_DE.UTF-8; qtparted)

在我的英语桌面上也以德语显示.显然,我必须安装德语文件才能使翻译的应用程序正常工作.

also comes up in German on my English desktop. Obviously I had to install the German language files to get the translated app working.

这篇关于以其他语言运行Qt应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆