NickDroid
NickDroid

Reputation: 113

Android app bundle not supporting dynamic language change

My app supports multi languages and which can change dynamically within app and that is working fine with APK previously. But When I adapt AAB instead of APK then I am facing this issue. Now my app not change language within app but if I will change language of my device then It will change language of my app as well. Is there any solution for the above issue instead of using

bundle {
        language {
            enableSplit = false
        }
    }

Upvotes: 1

Views: 3160

Answers (2)

Mori
Mori

Reputation: 4651

Download additional language resources

With app bundles, devices download only the code and resources they require to run your app. So, for language resources, a user’s device downloads only your app’s language resources that match the one or more languages currently selected in the device’s settings.

If you want your app to have access to additional language resources—for example, to implement an in-app language picker, you can use the Play Core Library to download them on demand.

1. The main way, please see this link:

https://developer.android.com/guide/playcore/feature-delivery/on-demand#lang_resources

2. The latest Android App Bundle updates including the additional languages API

Get a list of installed languages

3. This way will increase the size of the app.

android {
    bundle {
        language {
          
            enableSplit = false
        }
    }
}

4. Use APKs if you want to have an in app language picker.

Upvotes: 10

Bacho Kurtanidze
Bacho Kurtanidze

Reputation: 605

add this in your app level gradle inside of defaultConfig, with languages you want to include in your application

resConfigs "en", "fr", "ru"

Upvotes: -2

Related Questions