public class StubLocaleProvider extends Object implements LocaleProvider
| Constructor and Description |
|---|
StubLocaleProvider(Locale locale) |
| 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 requestedLocale)
|
boolean |
isFallbackEnabled()
Returns
true if for the current session the Locale fallback is enabled. |
Locale |
toDataLocale(Locale external)
Converts a arbitrary locale instance into one which is allowed to read and write data with.
|
public StubLocaleProvider(Locale locale)
public Locale getCurrentDataLocale()
LocaleProviderI18NService.getCurrentLocale()!getCurrentDataLocale in interface LocaleProviderpublic List<Locale> getFallbacks(Locale requestedLocale)
LocaleProvidergetFallbacks in interface LocaleProviderrequestedLocale - 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.public Locale toDataLocale(Locale external)
LocaleProvidertoDataLocale in interface LocaleProviderexternal - the localeCopyright © 2017 SAP SE. All Rights Reserved.