localizeOrDefault

fun Context.localizeOrDefault(tableName: String = STDLIB_LOCALIZATION_TABLE_NAME, key: String): String?

Localizes a key from the stdlib table. If the key is not found in the context's locale, it falls back to the default locale (English).

Return

the localized string (preferably in the context's locale, or in the fallback locale otherwise) if the key exists in the std table, null otherwise

Parameters

tableName

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

key

localization key