Application_ru.qm is not detected automatically
-
I try to translate an application to russian and can't figure out how to do it properly.
I have managed to get .qm file as being told at http://qt-project.org/doc/qt-5/linguist-programmers.html.Now there is a phrase at http://qt-project.org/doc/qt-5/linguist-manager.html saying:
bq. Once the QM files are available the application will detect them and use them automatically
I rebuild an application but there is no russian translation.
What other things should I check/do to get it working?
I test on laptop with locale:
@
LANG=ru_RU.UTF-8
LANGUAGE=ru
@My .pro part of file:
@Translations
lupdate_only {
SOURCES = *.qml
*.js
}
TRANSLATIONS = tabatarium_ru.ts@
All translations in .ts file are "finished".
Thanks!
-
You need to use "QTranslator":http://qt-project.org/doc/qt-5/qtranslator.html to load the QM file.
-
[quote author="sierdzio" date="1406011863"]You need to use "QTranslator":http://qt-project.org/doc/qt-5/qtranslator.html to load the QM file.[/quote]
Thx!
Should translation files be included into resource file or placed next to executable? -
[quote author="Maxim Kim" date="1406013730"]Thx!
Should translation files be included into resource file or placed next to executable?[/quote]That is entirely up to you, depends on which you like more. I would recommend placing them next to the executable (for example, in "translations" folder), because it allows you to update the translation (or even add a new one) without having to compile and distribute your application binary again.
-
ok, thx a lot!