Interface LocaleProvider
-
- All Superinterfaces:
java.io.Serializable
- All Known Implementing Classes:
DefaultLocaleProvider,StubLocaleProvider
public interface LocaleProvider extends java.io.SerializableProvides access to current localization qualifier to be used insideAbstractItemModel.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.LocalegetCurrentDataLocale()Returns current (session) data locale to be used to read or store localized attribute data.java.util.List<java.util.Locale>getFallbacks(java.util.Locale requestedLocale)Returns aListwith fallbackLocales for the given Locale.booleanisFallbackEnabled()Returnstrueif for the current session theLocalefallback is enabled.java.util.LocaletoDataLocale(java.util.Locale external)Converts a arbitrary locale instance into one which is allowed to read and write data with.
-
-
-
Method Detail
-
getCurrentDataLocale
java.util.Locale getCurrentDataLocale()
Returns current (session) data locale to be used to read or store localized attribute data. May be other thanI18NService.getCurrentLocale()!
-
toDataLocale
java.util.Locale toDataLocale(java.util.Locale external)
Converts a arbitrary locale instance into one which is allowed to read and write data with.- Parameters:
external- the locale- Throws:
java.lang.IllegalArgumentException- if no supported data locale could be found
-
isFallbackEnabled
boolean isFallbackEnabled()
Returnstrueif for the current session theLocalefallback is enabled.- Returns:
falseotherwise.
-
getFallbacks
java.util.List<java.util.Locale> getFallbacks(java.util.Locale requestedLocale)
Returns aListwith fallbackLocales for the given Locale.- Parameters:
requestedLocale- the Locale for which all fallback Locales are requested.- Returns:
nullif the locale fallback is not enabled (seeisFallbackEnabled()).
-
-