copyWithString

fun copyWithString(language: String?, string: String): LocalizedString

Returns a new LocalizedString after adding (or replacing) the translation with the given language.