public class DefaultLocaleProvider extends Object implements LocaleProvider
AbstractItemModel. It wraps the I18NService.| Constructor and Description |
|---|
DefaultLocaleProvider(I18NService i18NService) |
| Modifier and Type | Method and Description |
|---|---|
Locale |
getCurrentDataLocale()
Returns current (session) data locale to be used to read or store localized attribute data.
|
List<Locale> |
getFallbacks(Locale requested)
|
boolean |
isFallbackEnabled()
Returns
true if for the current session the Locale fallback is enabled. |
protected I18NService |
service() |
Locale |
toDataLocale(Locale external)
Converts a arbitrary locale instance into one which is allowed to read and write data with.
|
public DefaultLocaleProvider(I18NService i18NService)
protected I18NService service()
public Locale getCurrentDataLocale()
LocaleProviderI18NService.getCurrentLocale()!getCurrentDataLocale in interface LocaleProviderpublic Locale toDataLocale(Locale external)
LocaleProvidertoDataLocale in interface LocaleProviderexternal - the localepublic List<Locale> getFallbacks(Locale requested)
LocaleProvidergetFallbacks in interface LocaleProviderrequested - the Locale for which all fallback Locales are requested.null if the locale fallback is not enabled (see LocaleProvider.isFallbackEnabled()).public boolean isFallbackEnabled()
LocaleProvidertrue if for the current session the Locale fallback is enabled.isFallbackEnabled in interface LocaleProviderfalse otherwise.Copyright © 2017 SAP SE. All Rights Reserved.