atrium-impl-robstoll / ch.tutteli.atrium.reporting.translating / ResourceBundleBasedTranslator / create

create

fun create(primaryLocale: Locale, vararg fallbackLocales: Locale): ResourceBundleBasedTranslator

Creates a ResourceBundleBasedTranslator and aggregates it with a ResourceBundle.Control which either makes use of the given fallbackLocales if provided or uses only the given primaryLocale.

Parameters

primaryLocale - The primary Locale which will be used in java.lang.String.format to substitute the placeholders in the resulting translation of ITranslatableWithArgs.translatable with the ITranslatableWithArgs.arguments. fallbackLocales - Used in case a translation for a given ITranslatable is not defined for primaryLocale or one of its secondary alternatives -- the fallbacks are used in the given order.