A step-by-step guide to implementing in-app language switching for Kotlin Multiplatform (KMP) projects targeting Android and iOS. The tutorial covers creating platform-specific locale providers using expect/actual functions, setting up string resources with qualifiers for multiple languages, persisting language preferences with DataStore, and using CompositionLocal to trigger UI updates. The implementation differs between platforms: Android uses configuration changes while iOS modifies NSUserDefaults. The solution allows users to change app language independently of system settings, with persistence across app restarts.

39m watch time

Sort: