[Qt-interest] Localization of plugins

Anatoly Burakov burakov.anatoly at googlemail.com
Mon Nov 2 13:00:21 CET 2009


R. Reucher wrote:
> Oops, there's actually a syntax error, sorry!
>
> On Mon, 02 Nov 2009 11:53:19 +0000, R. Reucher wrote:
>   
>>   QString lang = "de";
>>   ...
>>   myAppTranslator = new QTranslator(0);
>>   myAppTranslator->load("data/lang/myapp_") + lang + ".qm");
>>     
>                                       here ^^^
>   
>>   qApp->installTranslator(myAppTranslator); ...
>>   myPluginTranslator = new QTranslator(0);
>>   myPluginTranslator->load("data/lang/plugin_") + lang + ".qm");
>>     
>                                   and here ^^^
>   
>>   qApp->installTranslator(myPluginTranslator); ...
>>     
OK, looks like i confused QApplication::installTranslator with 
QTranslator::load()... Now here's another question - since i plan to 
embed translations into plugins' resources, is there any way to load 
them from there? or should i leave them out of the plugin files to be 
able to use them?



More information about the Qt-interest-old mailing list