getLocalizedStringFromBundleFormatted

fun getLocalizedStringFromBundleFormatted(res: String?, key: String, default: String?, table: String?, vararg args: Any): String?(source)

Retrieves a localized and formatted string from a specified bundle. Uses the provided key, default value, table, and any additional arguments for string formatting. If no localized string is found, it falls back to the default value.

Return

The localized and formatted string, or null if no string could be resolved.

Parameters

res

The resource specification, usually a language code.

key

The key associated with the localized string resource.

default

The default string to use if the localized string is not found. Can be null.

table

The name of the table (e.g., file) in the bundle containing the localization data. Can be null.

args

The arguments to format the resulting string. Supports up to 10 arguments.