LocalizedStrings

Provides runtime access to localized strings generated from JSON translation resources.

The lookup falls back to English (en) and finally to the key itself when no translation is found.

Functions

Link copied to clipboard

Returns all available locales for which translations are bundled.

Link copied to clipboard

Returns the normalized current platform locale used for translation lookup.

Link copied to clipboard

Returns a localized value for key using the current platform locale.

fun getString(key: String, locale: String): String

Returns a localized value for key using the provided locale.

fun getString(key: String, locale: String, placeholders: Map<String, String>): String

Returns a localized value for key using locale, replacing placeholders in the form {placeholder} with values from placeholders.