YarikSOffice / LanguageTest

Changing the language on Android

Home Page:https://proandroiddev.com/change-language-programmatically-at-runtime-on-android-5e6bc15c758

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Base context already set

harifsp opened this issue · comments

Hi YarikSOffice,

Thanks for the Library.

I have already using attachBaseContext for Font's

@OverRide
protected void attachBaseContext(Context base) {
super.attachBaseContext(CalligraphyContextWrapper.wrap(base)); //for font's
super.attachBaseContext(LocaleManager.setLocale(base)); //for language
}

Could you please tell me how to use multiple attachBaseContext in same Activity?

Thanks in Advance.

Hi harifsp,

Try to use createConfigurationContext passing the context returned from CalligraphyContextWrapper.wrap. Another option is using updateConfiguration as described in the article https://proandroiddev.com/change-language-programmatically-at-runtime-on-android-5e6bc15c758 .

can i have a library?