interface LocaleOrderDecider
(source)
Responsible to decide in which order Locales should be processed.
It should follow Java's Locale conventions (e.g. locales are written with _
and not with -
). To put it
differently it should be more or less compatible with Java's ResourceBundle.Control.getCandidateLocales
except for:
no
does not need to be considered, is not supported by
Translator.zh
with script Hant
or Hans
without providing a country does not need to
be treated specially because Translator does not support it. However, it still has to set script to Hant
or Hans
in case script is not defined by the user but country was.java.util.Locale.ROOT
does not exist for in Atrium's Locale.
abstract fun determineOrder(primaryLocale: Locale, fallbackLocales: List<Locale>): Sequence<Locale>
Defines the Sequence of Locales which should be used in Translator.translate. |
object ResourceBundleInspiredLocaleOrderDecider : LocaleOrderDecider
Responsible to determine in which order Locales should be processed. |