getUserMessage

fun LocalizableInteraction.getUserMessage(localizationPath: String, vararg entries: PairEntry): String(source)

Returns the localized message at the following path, using the user's locale and parameters.

Bundle resolution

The bundle used is either the defined bundle or one of the registered bundles.

The locale of the bundle is the best available, for example, if fr_FR is not available, then fr will be used, and otherwise, the root bundle (without any suffix) will be used.

Configuring the user locale source

The user locale is retrieved from the interaction by default, but can be changed by implementing your own UserLocaleProvider service.

Parameters

localizationPath

The path of the message to translate, will be prefixed with localizationPrefix unless starting with /

entries

The values replacing arguments of the localization template

Throws

If: