localizeOrNull

fun Context.localizeOrNull(tableName: String = STDLIB_LOCALIZATION_TABLE_NAME, key: String, locale: Locale? = null): String?

Localizes a key from a table.

Return

the localized string if the key exists in the table, null otherwise

Parameters

key

key to localize

tableName

name of the table. Defaults to the stdlib table (std).

locale

the locale to localize for, defaulting to the one set in the context's metadata, if any

See also