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