Localitzation of transtation files and name of locales.
-
Dear all,
I'm developing an application with some translations files. These translation files could be installed automatically by .pro file. However in the application, to load a translation file, QTranstalor needs the directory where the translation files are located. From the application point of view, at runtime how can It to now where the translations files are located? Perhaps a variable from qmake should be passed to the application?
The name of the translation files should include the name of the locale. In Qt5.3, the name of translations only includes the name of the language but not the country (qt_ca.qm), however when I define a locale for a language, the name of the locale is 'language_COUNTRY' (qt_ca_ES.qm). Which is the right format of the translation file name?
Thanks and Best Regards,
Joaquim Duran -
Did you check QCoreApplication::applicationDirPath(..) or applicationFilePath(..) etc ?
-
Where are you placing translation files ? You can put your application translation files in your application directory path while installing your app. This way you can load from your path only.