Interface LocalizationService
- All Known Implementing Classes:
DefaultLocalizationService
I18NService for localization service instead.-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionLocale[]getAllLocales(Locale loc) Deprecated, for removal: This API element is subject to removal in a future version.since ages - as of release 4.3, please useI18NService.getAllLocales(Locale)Deprecated, for removal: This API element is subject to removal in a future version.since ages - as of release 4.3, please useI18NService.getCurrentLocale()Deprecated, for removal: This API element is subject to removal in a future version.since ages - as of release 4.3, please useI18NService.getCurrentLocale()getDataLanguageIsoCode(Locale locale) Deprecated, for removal: This API element is subject to removal in a future version.since ages - as of release 4.3, please useI18NService.getBestMatchingLocale(Locale)getDataLocale(Locale loc) Deprecated, for removal: This API element is subject to removal in a future version.since ages - as of release 4.3, please useI18NService.getBestMatchingLocale(Locale)Locale[]getFallbackLocales(Locale loc) Deprecated, for removal: This API element is subject to removal in a future version.since ages - as of release 4.3, please useI18NService.getFallbackLocales(Locale)getLocaleByString(String locale) Deprecated, for removal: This API element is subject to removal in a future version.since ages - as of release 4.3, not supported anymore.getMatchingPkForDataLocale(Locale locale) Deprecated, for removal: This API element is subject to removal in a future version.Returns proper language PK for matching locale.Deprecated, for removal: This API element is subject to removal in a future version.since ages - as of release 4.3, please useI18NService.getSupportedLocales()booleanDeprecated, for removal: This API element is subject to removal in a future version.since ages - as of release 4.3, please useI18NService.isLocalizationFallbackEnabled()voidsetCurrentLocale(Locale loc) Deprecated, for removal: This API element is subject to removal in a future version.since ages - as of release 4.3, please useI18NService.setCurrentLocale(Locale)voidsetLocalizationFallbackEnabled(boolean enabled) Deprecated, for removal: This API element is subject to removal in a future version.since ages - as of release 4.3, please useI18NService.setLocalizationFallbackEnabled(boolean)
-
Field Details
-
BEAN
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
-
Method Details
-
getLocaleByString
Deprecated, for removal: This API element is subject to removal in a future version.since ages - as of release 4.3, not supported anymore. Please useCommonI18NService.getLocaleForLanguage(de.hybris.platform.core.model.c2l.LanguageModel)Returns a
Localeaccording language (iso-code), country (iso-code) and vendor id. The three parameters are passed as String. Supported delimiters are: _ , . ;getLocaleByIsoCode("de_DE_WIN");
getLocaleByIsoCode("en,AT,"); -
getAllLocales
Deprecated, for removal: This API element is subject to removal in a future version.since ages - as of release 4.3, please useI18NService.getAllLocales(Locale)Returns a collection of Locales for the passed Language.
Each Locale element only contains language information and gets constructed from the fallback languages of the passed language. -
getFallbackLocales
Deprecated, for removal: This API element is subject to removal in a future version.since ages - as of release 4.3, please useI18NService.getFallbackLocales(Locale)Like getAllLocales(Locale loc) but just return the fallbacks themselves
-
getDataLocale
Deprecated, for removal: This API element is subject to removal in a future version.since ages - as of release 4.3, please useI18NService.getBestMatchingLocale(Locale)For a given locale this method tries to find a matching locale which is backed by a hybris language item. If the given locale has got country and or variant part and no language can be found for the complete locale the method tries to find a matching locale without variant and, at last, without country. In case not even the language part can be matched a exception is raised since the given locale cannot be used as data locale at all.
- Parameters:
loc- the locale to match- Throws:
IllegalArgumentException- if no matching locale could be found
-
getCurrentLocale
Deprecated, for removal: This API element is subject to removal in a future version.since ages - as of release 4.3, please useI18NService.getCurrentLocale()Returns current (session) locale.
- Returns:
- from the current
JaloSessionthe attachedLocale.
-
setCurrentLocale
Deprecated, for removal: This API element is subject to removal in a future version.since ages - as of release 4.3, please useI18NService.setCurrentLocale(Locale)Changes current session locale.
- Parameters:
loc- the new session locale- Throws:
IllegalArgumentException- if locale is null or if underlying persistence layer does not provide a matching data locale
-
getCurrentDataLocale
Deprecated, for removal: This API element is subject to removal in a future version.since ages - as of release 4.3, please useI18NService.getCurrentLocale()Returns the locale used for reading and writing localized attribute values. Since the underlying persistence layer may offer fewer localizations it may be different from current locale (see
getCurrentLocale()but should be related some how (e.g. holding the same language part). -
getDataLanguageIsoCode
Deprecated, for removal: This API element is subject to removal in a future version.since ages - as of release 4.3, please useI18NService.getBestMatchingLocale(Locale)Tries to find a data language iso code matching the given locale.
- Parameters:
locale- the locale to get data language code for- Throws:
IllegalArgumentException- if not data language could be found
-
isLocalizationFallbackEnabled
Deprecated, for removal: This API element is subject to removal in a future version.since ages - as of release 4.3, please useI18NService.isLocalizationFallbackEnabled()Returns
falseif in the currentJaloSessionthe attributeAbstractItemModel.LANGUAGE_FALLBACK_ENABLED_SERVICE_LAYERdoes not exists or the value of this attribute is set tofalse.- Returns:
trueif in the current JaloSession the localization fallback is enabled.
-
setLocalizationFallbackEnabled
Deprecated, for removal: This API element is subject to removal in a future version.since ages - as of release 4.3, please useI18NService.setLocalizationFallbackEnabled(boolean)Sets to the current
JaloSessionthe attributeAbstractItemModel.LANGUAGE_FALLBACK_ENABLED_SERVICE_LAYERwith the given parameter. Enables or diables the localization fallback mode.- Parameters:
enabled- iftruethe localization fallback will be enabled.
-
getSupportedDataLocales
Deprecated, for removal: This API element is subject to removal in a future version.since ages - as of release 4.3, please useI18NService.getSupportedLocales()- Returns:
- a Set of
Locales for the current system.
-
getMatchingPkForDataLocale
Deprecated, for removal: This API element is subject to removal in a future version.Returns proper language PK for matching locale.- Parameters:
locale- the locale to get data language code for- Returns:
- language pk
- Throws:
IllegalArgumentException- when matching DataLocale cannot be find
-