Loading Qt 5 translations

Albert Astals Cid aacid at kde.org
Sun May 25 09:05:17 UTC 2014


El Dissabte, 17 de maig de 2014, a les 18:21:16, Lasse Liehu va escriure:
> Hi
> 
> Translations for frameworks are loaded automatically when they are
> used, but what about Qt 5 itself? Are those translations loaded and if
> not, how should they be loaded?

They are loaded "manually", i.e. if you look at qt designer code it does

    translatorFileName = QStringLiteral("qt_");
    translatorFileName += localSysName;
    qtTranslator->load(translatorFileName, resourceDir);

Now i think we should do this automagically, since well, we need this for all 
apps and people will forget. The big question is where to put this code.

Aurelien any idea?

Cheers,
  Albert

> 
> From testing using German locale it looks like Qt 5 translations are
> not loaded. Most generic buttons like Ok, Close, Cancel and so on
> appear as untranslated. Looked at KWrite, Konsole and System Settings.
> Using same locale settings (LC_ALL and LANG set to de_DE.UTF-8 and
> LANGUAGE=de) Qt Designer appeared fully in German.
> 
> Cheers,
> Lasse



More information about the Kde-frameworks-devel mailing list