Android App Bundle with in-app locale change

后端 未结 2 2092
北荒
北荒 2020-11-29 06:41

I\'ve a problem with AAB when I need to change the app locale from within the app itself(i.e. have the language change setting inside the app), the issue is that the AAB giv

相关标签:
2条回答
  • 2020-11-29 07:00

    Edit:

    The PlayCore API now supports downloading the strings for another language on-demand: https://developer.android.com/guide/app-bundle/playcore#lang_resources

    Alternative solution (discouraged):

    You can disable the splitting by language by adding the following configuration in your build.gradle

    android {
        bundle {
            language {
                // Specifies that the app bundle should not support
                // configuration APKs for language resources. These
                // resources are instead packaged with each base and
                // dynamic feature APK.
                enableSplit = false
            }
        }
    }
    

    This latter solution will increase the size of the app.

    0 讨论(0)
  • 2020-11-29 07:09

    This is not possible with app bundles: Google Play only downloads resources when the device's selected languages change.

    You'll have to use APKs if you want to have an in app language picker.

    0 讨论(0)
提交回复
热议问题