Translations
Learn here how to do translations in AppKickstarter.

AppKickstarter leverages Moko resources to manage translations.
In shared module, in commonMain, there is a moko-resources folder.
In this folder there are base localization, all the localizations you want (here fr), images and fonts.
All the resources here are bundled in the target platform (Android, iOS, etc).
Define XML key values
Base strings.xml:
<resources>
<string name="login">Login</string>
<string name="signup">Create an account</string>
</resources>
French strings.xml:
<resources>
<string name="login">Se connecter</string>
<string name="signup">Creer un compte</string>
</resources>
Access in shared code or every where in the project
Use SharedRes.strings to access localizations:
Button(onClick = { login() } {
Text(SharedRes.strings.login)
}
Last updated
Was this helpful?