[SailfishDevel] Running application with customized environment using invoker
Ove Kåven
ovek at arcticnet.no
Wed Apr 22 18:07:58 UTC 2015
Den 22. april 2015 18:56, skrev Dmitriy Purgin:
> $ LANG=ru_RU invoker --type=silica-qt5 appbin
>
> does not change the app locale, it behaves as if there were no
> LANG=ru_RU at all. So does QLocale::setDefault().
I think setting environment variables and calling QLocale::setDefault
only works if Qt has not yet been initialized. Since the invoker has
already initialized Qt, changing the default locale is probably impossible.
It seems possible to force Qt to use different translations, though,
with QApplication::installTranslator. Just load the necessary Russian
translations and install them, and Qt will use them. There's an example
on http://wiki.qt.io/How_to_create_a_multi_language_application, but not
sure how it would work on Sailfish...
More information about the Devel
mailing list