ResourceBundleInspiredLocaleOrderDecider

Responsible to determine in which order Locales should be processed.

Inspired by Java's ResourceBundle.Control.getCandidateLocales() and ResourceBundle.Control.getFallbackLocale() but there are a few differences:

  • it is based on Atrium's Locale and not java.util.java

  • allows to define more than one fallback Locale

  • does not use getDefaultLocale implicitly (one can define it explicitly as fallback Locale though)

  • it does not return java.util.Locale.ROOT

Further information can be found at LocaleOrderDecider.

Functions

Link copied to clipboard
open override fun determineOrder(primaryLocale: Locale, fallbackLocales: List<Locale>): Sequence<Locale>

Defines the Sequence of Locales which should be used in Translator.translate.