Android App Bundle with in-app locale change

﹥>﹥吖頭↗ 提交于 2019-11-29 03:04:31

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.

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.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!