Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

iOS localization



  • I need localize some text in Info.plist (e.g. NSLocationAlwaysUsageDescription). I not found solution for Qt. I trying create InfoPlist.strings and ru.lproj/InfoPlist.strings, but what needed in .pro?



  • I resolved my problem.

    1. Remove NSLocationAlwaysUsageDescription from Info.plist
    2. Create en.lproj/InfoPlist.strings and ru.lproj/InfoPlist.strings
    3. Add to .pro file this:
        TRANSLATE_ru.files = $$PWD/ru.lproj/InfoPlist.strings
        TRANSLATE_ru.path = ru.lproj
        QMAKE_BUNDLE_DATA += TRANSLATE_ru
    
        TRANSLATE_en.files = $$PWD/en.lproj/InfoPlist.strings
        TRANSLATE_en.path = en.lproj
        QMAKE_BUNDLE_DATA += TRANSLATE_en
    


  • I have also tried above solution but it is not taking value from en.lproj/InfoPlist.strings. Can anybody explain what I am missing?


Log in to reply