Interface LocalizationService

  • All Known Implementing Classes:
    DefaultLocalizationService

    @Deprecated
    public interface LocalizationService
    Deprecated.
    since ages
    Only for internal usage. Use I18NService for localization service instead.
    • Method Detail

      • getLocaleByString

        @Deprecated
        java.util.Locale getLocaleByString​(java.lang.String locale)
        Deprecated.
        since ages - as of release 4.3, not supported anymore. Please use CommonI18NService.getLocaleForLanguage(de.hybris.platform.core.model.c2l.LanguageModel)

        Returns a Locale according 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
        java.util.Locale[] getAllLocales​(java.util.Locale loc)
        Deprecated.
        since ages - as of release 4.3, please use I18NService.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
        java.util.Locale[] getFallbackLocales​(java.util.Locale loc)
        Deprecated.
        since ages - as of release 4.3, please use I18NService.getFallbackLocales(Locale)

        Like getAllLocales(Locale loc) but just return the fallbacks themselves

      • getDataLocale

        @Deprecated
        java.util.Locale getDataLocale​(java.util.Locale loc)
        Deprecated.
        since ages - as of release 4.3, please use I18NService.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:
        java.lang.IllegalArgumentException - if no matching locale could be found
      • getCurrentLocale

        @Deprecated
        java.util.Locale getCurrentLocale()
        Deprecated.
        since ages - as of release 4.3, please use I18NService.getCurrentLocale()

        Returns current (session) locale.

        Returns:
        from the current JaloSession the attached Locale.
      • setCurrentLocale

        @Deprecated
        void setCurrentLocale​(java.util.Locale loc)
        Deprecated.
        since ages - as of release 4.3, please use I18NService.setCurrentLocale(Locale)

        Changes current session locale.

        Parameters:
        loc - the new session locale
        Throws:
        java.lang.IllegalArgumentException - if locale is null or if underlying persistence layer does not provide a matching data locale
      • getCurrentDataLocale

        @Deprecated
        java.util.Locale getCurrentDataLocale()
        Deprecated.
        since ages - as of release 4.3, please use I18NService.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
        java.lang.String getDataLanguageIsoCode​(java.util.Locale locale)
        Deprecated.
        since ages - as of release 4.3, please use I18NService.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:
        java.lang.IllegalArgumentException - if not data language could be found
      • getSupportedDataLocales

        @Deprecated
        java.util.Set<java.util.Locale> getSupportedDataLocales()
        Deprecated.
        since ages - as of release 4.3, please use I18NService.getSupportedLocales()
        Returns:
        a Set of Locales for the current system.
      • getMatchingPkForDataLocale

        PK getMatchingPkForDataLocale​(java.util.Locale locale)
        Deprecated.
        Returns proper language PK for matching locale.
        Parameters:
        locale - the locale to get data language code for
        Returns:
        language pk
        Throws:
        java.lang.IllegalArgumentException - when matching DataLocale cannot be find