determineOrder

open override fun determineOrder(primaryLocale: Locale, fallbackLocales: List<Locale>): Sequence<Locale>(source)

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

The first Locale of the Sequence is the given primaryLocale, then secondary alternatives follow as defined by Java's ResourceBundle.Control.getCandidateLocales and finally the given fallbackLocales (in the given order) are used as fallback for the primaryLocale, which means the process starts over again.

Return

A Sequence of Locales which defines the order in which translations should be searched for.

Parameters

primaryLocale

The primary Locale which should be the first element of the returned Sequence.

fallbackLocales

The fallback Locale's which should be used in case no translation could be found for the primaryLocale and its secondary alternatives.