Change locale yandexMapKit 4.0 Android

261 Views Asked by At

Is there any way to change locale in runtime in mapkit 4.0?

Using I18nManagerFactory.setLocale() do nothing.

In my app language changes at runtime for application and MapKitFactory.setLocale crushes with error

setApiKey() should be called before initialize()!

when activity restarting

1

There are 1 best solutions below

0
On

Where exactly are you calling the setter? Try inside the onCreate method before initializing the activity.

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        ...
        I18nManagerFactory.setLocale();
        ...


    }