akexorcist / Localization

[Android] In-app language changing library
Apache License 2.0
983 stars 154 forks source link

Change Language from Fragment #120

Closed BluestarCo closed 2 years ago

BluestarCo commented 3 years ago

Hi how to call setLanguage function from fragment for change language?

i have FragmentStatePagerAdapter for intro pages and i need to change language from child fragments

thanks.

kylevessPL commented 3 years ago

Call getActivity().setLanguage(lang)

akexorcist commented 2 years ago

You can call (getActivity() as? LocalizationActivity)?.setLanguage(language)