Android app bundle not supporting dynamic language change
Asked Answered
A

2

1

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
        }
    }
Adriel answered 24/4, 2020 at 9:44 Comment(2)
I think you're looking for #52732170 tldr; use the Play Core API to download the languages from Play.Graecoroman
what is the issue with using what you mentioned? I'm asking to know if there are any serious issues because I want to adopt this approach to my app.Anisometric
R
10

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.

Retro answered 8/4, 2022 at 7:49 Comment(0)
B
-2

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

resConfigs "en", "fr", "ru"
Bouzoun answered 24/4, 2020 at 10:10 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.