LocalizedString
data class LocalizedString(val translations: Map<String?, LocalizedString.Translation> = emptyMap()) : JSONable, Parcelable
Represents a string with multiple translations indexed by a BCP 47 language tag.
Constructors
Link copied to clipboard
Shortcut to create a LocalizedString using a single string for a given language.
Properties
Functions
Link copied to clipboard
Returns a new LocalizedString after adding (or replacing) the translation with the given language.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun mapLanguages(transform: (Map.Entry<String?, LocalizedString.Translation>) -> String?): LocalizedString
Returns a new LocalizedString after applying the transform function to each language.
Link copied to clipboard
fun mapTranslations(transform: (Map.Entry<String?, LocalizedString.Translation>) -> LocalizedString.Translation): LocalizedString
Returns a new LocalizedString after applying the transform function to each translation.
Link copied to clipboard
Serializes a LocalizedString to its RWPM JSON representation.
Link copied to clipboard