[Interest] Android: include and use the translation files of Qt (qt_*.qm)

Jérôme Godbout godboutj at amotus.ca
Mon Aug 19 15:44:51 CEST 2019


I personnaly use a qt.conf for mobile device and leave the i18n into resources:

[Paths]
Translations = :/i18n
Qml2Imports = :/qml

You can put the qt.conf into your resource file:
qrc:/qt/etc/qt.conf
so it will be used directly.

This work for me.

-----Original Message-----
From: Interest <interest-bounces at qt-project.org> On Behalf Of Alexander Dyagilev
Sent: August 19, 2019 5:38 AM
To: interest at qt-project.org
Subject: Re: [Interest] Android: include and use the translation files of Qt (qt_*.qm)

Ahh... I should use $$[QT_INSTALL_TRANSLATIONS] instead of $$QT_INSTALL_TRANSLATIONS.

I just know nothing xD


On 8/19/2019 10:48 AM, Alexander Dyagilev wrote:
> Filed the bug...
> https://bugreports.qt.io/browse/QTBUG-77661
>
> On 8/19/2019 10:35 AM, Alexander Dyagilev wrote:
>> Hmm.... This QT_INSTALL_TRANSLATIONS is empty under Android config.
>>
>> However, it's defined for Windows/Mac/Desktop Linux.... Any help?
>>
>> On 8/19/2019 5:41 AM, Alexander Dyagilev wrote:
>>> Something like this?
>>>
>>> qt_qm_files.path = /assets/translations qt_qm_files.files += 
>>> $$QT_INSTALL_TRANSLATIONS/qt_*.qm INSTALLS += qt_qm_files
>>>
>>> On 8/19/2019 5:39 AM, Alexander Dyagilev wrote:
>>>> Looks like I should use qmake's INSTALLS variable and install all 
>>>> the required qt_*.qm files into assets folder?
>>>>
>>>> On 8/19/2019 5:36 AM, Alexander Dyagilev wrote:
>>>>> Hello,
>>>>>
>>>>> Is there a "good" way to achieve this?
>>>>>
>>>>> The only solution for know I'm thinking of is to manually copy all 
>>>>> them into my project folder and include into resource files.
>>>>>
>>>>> This is not good because I'll have to store them in my repository 
>>>>> and I'll have to update them every time I update Qt.
>>>>>
>>>>> What I want instead is to be able to tell qmake/androiddeployqt 
>>>>> tools to add all these files automatically from Qt installation 
>>>>> folder into my APK.
>>>>>
_______________________________________________
Interest mailing list
Interest at qt-project.org
https://lists.qt-project.org/listinfo/interest


More information about the Interest mailing list