https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
r

Raed Ghazal

12/11/2023, 7:25 AM
Hey, anyone dealt with in-app language change in KMP? my app supports android and iOS, in Android its done but on iOS I’m not sure about the right way of doing it found this code on the internet
Copy code
val defaults = NSUserDefaults.standardUserDefaults
defaults.setValue(
    value = appLanguage.code,
    forKey = "AppleLanguages"
)
defaults.synchronize()
but I have 2 issues: 1. the app doesn’t change its language until I close the app from the background and reopen it 2. only changing the language to english “en” works, but changing it to Arabic “ar” doesn’t for some reason
2 Views