setLocaleMessagesAndDefaultLocale

@JvmStatic
fun setLocaleMessagesAndDefaultLocale(locale: String)

Sets a locale with the auto provided LookupMessages to be available when using the format function. also Sets the default locale.

Note: This function uses ISO 639-1 language code to identify the language. For more information see ISO 639-1.

Example:

setLocaleMessagesAndDefaultLocale(AR)

Since

1.1.0

Throws

if the locale is not supported.


@JvmStatic
fun setLocaleMessagesAndDefaultLocale(locale: String, lookupMessages: LookupMessages)

Sets a locale with the auto provided LookupMessages to be available when using the format function. also Sets the default locale.

Note: This function uses ISO 639-1 language code to identify the language. For more information see ISO 639-1.

Example:

object CustomMessages : LookupMessages {
...
}
setLocaleMessagesAndDefaultLocale("custom", CustomMessages)

Since

1.1.0

Throws

if the locale is not supported.