Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. how to pack translation file to android apk
Forum Updated to NodeBB v4.3 + New Features

how to pack translation file to android apk

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
4 Posts 2 Posters 391 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • O Offline
    O Offline
    oscar99
    wrote on last edited by
    #1

    Hi,
    my app need to support switch language so i want to pack the translation file to apk. but how to do this? and after the apk installed what path i can find the translation file in android.

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      Easiest way is to add your translation files (.qm) to a Qt Resource File (.qrc). Then it will be compiled directly into the binary and you won't have to worry about deployment at all.

      (Z(:^

      O 1 Reply Last reply
      0
      • sierdzioS sierdzio

        Easiest way is to add your translation files (.qm) to a Qt Resource File (.qrc). Then it will be compiled directly into the binary and you won't have to worry about deployment at all.

        O Offline
        O Offline
        oscar99
        wrote on last edited by
        #3

        @sierdzio
        thanks, then after install the apk. where can i find this file? is it in the same folder with the application binary?

        1 Reply Last reply
        0
        • sierdzioS Offline
          sierdzioS Offline
          sierdzio
          Moderators
          wrote on last edited by
          #4

          It is inside application binary. You can access it using qtc:/ or :/ paths (this will work only in Qt code, not in Java). More info: https://doc.qt.io/qt-6/resources.html

          (Z(:^

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved