Internationalization
English and Indonesian localization in Compose and SwiftUI.
Included languages
The template includes English and Indonesian strings. Language settings offer System, English, and Bahasa Indonesia. Guest saves the choice locally; Account can synchronize the language preference with the backend through the shared preference flow.
Native resources are relative to mobile-app/:
| Platform | Resources |
|---|---|
| Android | sharedUI/src/androidMain/res/values/strings.xml and sharedUI/src/androidMain/res/values-in/strings.xml |
| iOS | iosApp/iosApp/Localizable.xcstrings |
Android uses the historical in resource qualifier for Indonesian; shared API preference mapping uses id.
Regeneration in the source repository
From templates/kmp/online/:
scripts/generate-localizations.sh
scripts/generate-localizations.sh --checkThe script invokes tools/localizations/generate.py and reads templates/flutter/online/lib/l10n/, the sibling Flutter ARB source. It generates the Android resources and iOS String Catalog together; --check compares generated output with the current files.
This script is not a standalone localization workflow in a delivered KMP project unless you also supply the sibling ARB inputs at the expected location. Do not assume the files in tools/localizations/kmp/ are the inputs used by this shell script. When using the generator, change its inputs and regenerate both platforms.
App identity and preferences
bowler setup updates localized app identity and onboarding copy. Use Rename Package for that workflow. Language persistence is managed by PreferencesStore.kt and ProductPreferenceSync.kt under sharedLogic/src/commonMain/kotlin/com/soewidiputra/kmponlate/.
After changing copy or supported languages, verify both native UIs, interpolation, long labels, and switching between System and an explicit language. See Settings.
