getLocalizedStringFromBundle
fun getLocalizedStringFromBundle(res: String?, key: String, default: String?, table: String?): String?(source)
Retrieves a localized string for a given key from the main application bundle or a base resource bundle. If the localized string is not found, the method returns a default string or null.
Return
The localized string if found, the default string if provided, or null if no match exists.
Parameters
res
The resource specification, usually a language code.
key
The key for the localized string.
default
The default string to return if the localized string is not found. If this value is blank, it will be treated as null.
table
The table in which to search for the key. This can be null to use the default table.