Magnus Gudmandsen
07/09/2021, 10:04 AMMagnus Gudmandsen
07/09/2021, 10:09 AMattachBaseContext
in activity, and wrap the context.
This works as expected everywhere else:
Locale.getDefault() returns the overriden language.
Calling getString in Fragment.onStart
(or outside onStart) returns the overriden language string
However:
Calling getString inside of a Composable
block gives me the string from the device language. Doesn’t matter how I call it: fragment.getString
, activity.getString
, or using the Compose stringResources
function.Albert Chang
07/09/2021, 10:19 AMMagnus Gudmandsen
07/09/2021, 12:06 PMattachBaseContext
part actually works, and my issue was 100% unrelated to Compose. It was all due to missing an important step in generating translations in our translation library that we’re using 😅
Thanks for the help anyway 🙂