Language Per Fragment in Single Activity Architecture [duplicate]

I am trying to recode my app with MVVM architecture and also single activity model. So I have a unique Activity managing all my fragments through navigation component.

My issue is that I have 2 parts in my app -> one part logged out and one logged in. And what I want is that the logged out part take the phone language and the logged in part the user choice (one of my 4 languages).

Is there a way to force a fragment language in this architecture and with navigation component?

Thanks for your help


Sadly, there is not a supported method provided by Android SDK to change application language at runtime.

An "hackish" method would be to save user Locale and set your desired Locale, restart the Activity and on application close put back the user Locale.