Class BroadleafThymeleaf3MessageResolver

java.lang.Object
org.thymeleaf.messageresolver.AbstractMessageResolver
org.broadleafcommerce.presentation.thymeleaf3.BroadleafThymeleaf3MessageResolver
All Implemented Interfaces:
org.thymeleaf.messageresolver.IMessageResolver

public class BroadleafThymeleaf3MessageResolver extends org.thymeleaf.messageresolver.AbstractMessageResolver
This implementation will check to see if the key matches the known i18n value key. If that is the case, we will attempt to translate the requested field value for the entity/key. If not, we will delegate to other message resolvers.
Author:
Andre Azzolini (apazzolini)
  • Field Details

    • LOG

      protected static final org.apache.commons.logging.Log LOG
    • I18N_VALUE_KEY

      protected static final String I18N_VALUE_KEY
      See Also:
    • translationService

      protected org.broadleafcommerce.common.i18n.service.TranslationService translationService
  • Constructor Details

    • BroadleafThymeleaf3MessageResolver

      public BroadleafThymeleaf3MessageResolver()
  • Method Details

    • resolveMessage

      public String resolveMessage(org.thymeleaf.context.ITemplateContext context, Class<?> origin, String key, Object[] messageParameters)
      Resolve a translated value of an object's property.
      Parameters:
      args -
      key -
      messageParams -
      Returns:
      the resolved message
    • createAbsentMessageRepresentation

      public String createAbsentMessageRepresentation(org.thymeleaf.context.ITemplateContext context, Class<?> origin, String key, Object[] messageParameters)