Is there anyway to change the locale of the String...
# multiplatform
j
Is there anyway to change the locale of the StringResources on KMM?
I use MoKO resource for now but it is not reactive now, So I am wandering is there any good way to do it
j
If you mean Compose Multiplatform resources, then no: https://youtrack.jetbrains.com/issue/CMP-4197
j
Yeah, thought so, that is super wired
t
I just created a localization setup for myself in KMP and it’s only a little tedious to use. Basically you have a value that gets set on app start natively (I set it through MainActivity, etc) and then a global function that will take in strings and pick the right one based on the set language. Android doesn’t get specific beyond “en” or “es” by default, but iOS will have things like “en-us” and you’ll have to drop the hyphen and anything after to standardize.
j
Moko resources have a build in function for that purpose
👍 1