Interface LocaleProvider
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
DefaultLocaleProvider,StubLocaleProvider
Provides access to current localization qualifier to be used inside
AbstractItemModel.-
Method Summary
Modifier and TypeMethodDescriptionReturns current (session) data locale to be used to read or store localized attribute data.getFallbacks(Locale requestedLocale) booleanReturnstrueif for the current session theLocalefallback is enabled.toDataLocale(Locale external) Converts a arbitrary locale instance into one which is allowed to read and write data with.
-
Method Details
-
getCurrentDataLocale
Locale getCurrentDataLocale()Returns current (session) data locale to be used to read or store localized attribute data. May be other thanI18NService.getCurrentLocale()! -
toDataLocale
Converts a arbitrary locale instance into one which is allowed to read and write data with.- Parameters:
external- the locale- Throws:
IllegalArgumentException- if no supported data locale could be found
-
isFallbackEnabled
boolean isFallbackEnabled()Returnstrueif for the current session theLocalefallback is enabled.- Returns:
falseotherwise.
-
getFallbacks
- Parameters:
requestedLocale- the Locale for which all fallback Locales are requested.- Returns:
nullif the locale fallback is not enabled (seeisFallbackEnabled()).
-