public interface I18NService
Locale, TimeZone, Currency). See DevNet page "Internationalization and Localization".| Modifier and Type | Method and Description |
|---|---|
Set<LanguageModel> |
getAllActiveLanguages()
Deprecated.
as of release 4.3, please use
)
Gets all active languages. |
Set<CountryModel> |
getAllCountries()
Deprecated.
as of release 4.3, please use
CommonI18NService.getAllCountries()
Return a set of all CountryModels. |
Set<CurrencyModel> |
getAllCurrencies()
Deprecated.
as of release 4.3, please use
CommonI18NService.getAllCurrencies()
Return a set of all CurrencyModels. |
Set<LanguageModel> |
getAllLanguages()
Deprecated.
as of release 4.3, please use
CommonI18NService.getAllLanguages()
Gets all languages. |
Locale[] |
getAllLocales(Locale locale)
Returns a collection of Locales for the passed Locale(Language).
Each Locale element only contains language information and gets constructed from the fallback languages of the passed language. |
CurrencyModel |
getBaseCurrency()
Deprecated.
as of release 4.3, please use
CommonI18NService.getBaseCurrency()
Return a currencyModel representing the base currency. |
Currency |
getBestMatchingJavaCurrency(String isocode)
Returns the Currency instance for the given currency iso code.
|
Locale |
getBestMatchingLocale(Locale locale)
For a given locale this method tries to find a matching locale which is backed by a hybris language item.
|
ResourceBundle |
getBundle(String baseName)
Deprecated.
as of release 4.3, please use
L10NService.getResourceBundle(String)
Returns a ResourceBundle which supports hybris specific fallback strategies.The fallback bundles are fetched according to the current session Language. |
ResourceBundle |
getBundle(String baseName,
Locale[] locales)
Deprecated.
as of release 4.3, please use
L10NService.getResourceBundle(String, Locale[])
Returns a ResourceBundle which supports hybris specific fallback strategies.Fallback bundles are fetched according to the passed locales. |
ResourceBundle |
getBundle(String baseName,
Locale[] locales,
ClassLoader loader)
Deprecated.
as of release 4.3, please use
L10NService.getResourceBundle(String, Locale[])
Returns a ResourceBundle which supports hybris specific fallback strategies.Fallback bundles are fetched according the passed locales. |
CountryModel |
getCountry(String isocode)
Deprecated.
as of release 4.3, please use
CommonI18NService.getCountry(String)
Returns a country by it's iso code. |
CurrencyModel |
getCurrency(String isoCode)
Deprecated.
as of release 4.3, please use
CommonI18NService.getCurrency(String)
Return a CurrencyModel pertinent to the isoCode. |
CurrencyModel |
getCurrentCurrency()
Deprecated.
as of release 4.3, please use
CommonI18NService.getCurrentCurrency()
return a CurrencyModel representing the current currency. |
Currency |
getCurrentJavaCurrency()
return a Currency representing the current currency.
|
Locale |
getCurrentLocale()
Returns current (session) locale (and not JVM's own locale).
|
TimeZone |
getCurrentTimeZone()
Returns current (session) timezone (and not JVM's own timezone).
|
String |
getEnumLocalizedName(HybrisEnumValue enumValue)
Deprecated.
as of release 4.3, please use
EnumerationService.getEnumerationName(HybrisEnumValue)
Provides localized name for enumeration value. |
Locale[] |
getFallbackLocales(Locale locale)
Like getAllLocales(Locale locale) but just return the fallbacks themselves
|
PK |
getLangPKFromLocale(Locale locale)
Returns proper language PK for matching locale.
|
LanguageModel |
getLanguage(String isocode)
Deprecated.
as of release 4.3, please use
CommonI18NService.getLanguage(String)
Gets the language for the given isocode. |
Set<Locale> |
getSupportedDataLocales()
Deprecated.
as of release 4.3, please use
getSupportedLocales() |
Set<Currency> |
getSupportedJavaCurrencies() |
Set<Locale> |
getSupportedLocales() |
boolean |
isLocalizationFallbackEnabled()
Return the status of the localization fallback flag.
|
void |
setCurrentCurrency(CurrencyModel currency)
Deprecated.
as of release 4.3, please use
CommonI18NService.setCurrentCurrency(CurrencyModel)
Sets the current currency. |
void |
setCurrentJavaCurrency(Currency currency)
Sets the current currency.
|
void |
setCurrentLocale(Locale locale)
Changes current session locale.
|
void |
setCurrentTimeZone(TimeZone timezone)
Changes current session timezone.
|
void |
setEnumLocalizedName(HybrisEnumValue enumValue,
String name)
Deprecated.
as of release 4.3, please use
EnumerationService.setEnumerationName(HybrisEnumValue, String)
Changes localized name for enumeration value. |
void |
setLocalizationFallbackEnabled(boolean enabled)
Set the status of the localization fallback flag.
|
Locale getCurrentLocale()
void setCurrentLocale(Locale locale)
locale - the new session localeSet<Locale> getSupportedLocales()
Locales for the current system.Set<Currency> getSupportedJavaCurrencies()
Currencys for the current system.TimeZone getCurrentTimeZone()
void setCurrentTimeZone(TimeZone timezone)
timezone - the new session timezoneCurrency getCurrentJavaCurrency()
void setCurrentJavaCurrency(Currency currency)
currency - the new currencyboolean isLocalizationFallbackEnabled()
The language fallback setting is a session scope setting.
void setLocalizationFallbackEnabled(boolean enabled)
The language fallback setting is a session scope setting.
enabled - true if localization fallback should be activatedCurrency getBestMatchingJavaCurrency(String isocode)
isocode - the iso codeIllegalArgumentException - if currencyCode is not a supported ISO 4217 code.Locale getBestMatchingLocale(Locale locale)
locale - the locale to matchIllegalArgumentException - if no matching locale could be foundLocale[] getAllLocales(Locale locale)
locale - the given localeLocale[] getFallbackLocales(Locale locale)
@Deprecated CurrencyModel getCurrentCurrency()
CommonI18NService.getCurrentCurrency()
return a CurrencyModel representing the current currency.@Deprecated void setCurrentCurrency(CurrencyModel currency)
CommonI18NService.setCurrentCurrency(CurrencyModel)
Sets the current currency.currency - the new currency@Deprecated Set<Locale> getSupportedDataLocales()
getSupportedLocales()Locales for the current system.@Deprecated ResourceBundle getBundle(String baseName)
L10NService.getResourceBundle(String)
Returns a ResourceBundle which supports hybris specific fallback strategies.baseName - bundle name@Deprecated ResourceBundle getBundle(String baseName, Locale[] locales)
L10NService.getResourceBundle(String, Locale[])
Returns a ResourceBundle which supports hybris specific fallback strategies.baseName - bundle namelocales - fallback locales (bundles)@Deprecated ResourceBundle getBundle(String baseName, Locale[] locales, ClassLoader loader)
L10NService.getResourceBundle(String, Locale[])
Returns a ResourceBundle which supports hybris specific fallback strategies.baseName - bundle namelocales - fallback locales (bundles)loader - classloader to use@Deprecated LanguageModel getLanguage(String isocode)
CommonI18NService.getLanguage(String)
Gets the language for the given isocode.isocode - the isocode a language is searched forUnknownIdentifierException - if the language with given isocode is not found@Deprecated Set<LanguageModel> getAllLanguages()
CommonI18NService.getAllLanguages()
Gets all languages.@Deprecated Set<LanguageModel> getAllActiveLanguages()
)
Gets all active languages.@Deprecated CountryModel getCountry(String isocode)
CommonI18NService.getCountry(String)
Returns a country by it's iso code.isocode - the isocodeUnknownIdentifierException - in case no country can be found@Deprecated Set<CountryModel> getAllCountries()
CommonI18NService.getAllCountries()
Return a set of all CountryModels.@Deprecated CurrencyModel getCurrency(String isoCode)
CommonI18NService.getCurrency(String)
Return a CurrencyModel pertinent to the isoCode.isoCode - the iso code@Deprecated Set<CurrencyModel> getAllCurrencies()
CommonI18NService.getAllCurrencies()
Return a set of all CurrencyModels.@Deprecated CurrencyModel getBaseCurrency()
CommonI18NService.getBaseCurrency()
Return a currencyModel representing the base currency.@Deprecated String getEnumLocalizedName(HybrisEnumValue enumValue)
EnumerationService.getEnumerationName(HybrisEnumValue)
Provides localized name for enumeration value.enumValue - the value@Deprecated void setEnumLocalizedName(HybrisEnumValue enumValue, String name)
EnumerationService.setEnumerationName(HybrisEnumValue, String)
Changes localized name for enumeration value.enumValue - the valuename - the new namePK getLangPKFromLocale(Locale locale)
locale - the locale to get data language code forIllegalArgumentException - when matching DataLocale cannot be findCopyright © 2017 SAP SE. All Rights Reserved.