Class LocaleHelper


  • public class LocaleHelper
    extends Object
    Helper for retrieving the locale String value for an indexable type and context.
    • Constructor Detail

      • LocaleHelper

        public LocaleHelper​(com.broadleafcommerce.translation.mapping.ContextLocaleHelper contextLocaleHelper)
    • Method Detail

      • getLocale

        @Nullable
        public String getLocale​(@Nullable
                                com.broadleafcommerce.data.tracking.core.context.ContextInfo context,
                                com.broadleafcommerce.search.api.type.IndexableType indexableType)
        Get the String representation of a locale for the context and indexable type.
        Parameters:
        context - The context information surrounding sandboxing/multitenant state
        indexableType - the indexable type in this context
        Returns:
        the locale String
      • getContextLocaleHelper

        protected com.broadleafcommerce.translation.mapping.ContextLocaleHelper getContextLocaleHelper()