i18n - how to pass variable and html code in message | Community
Skip to main content
New Participant
March 23, 2018
Solved

i18n - how to pass variable and html code in message

  • March 23, 2018
  • 1 reply
  • 1082 views

So I need to do something like:
Here is my message with inner_variable, ok.

inner_variable gonna be set in js and I need styles for it.

I tried something like:

.html

${'message' @ i18n, format='<span class="email-address__text"></span>'}

.xml

sling:message="Here is my message with {0}, ok."

But the span works like text and I can't set any values. Any suggestions?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by smacdonald2008

Where are you defining the variable in {}.

THis does not look right. IN HTL - normally these objects are set on Java backend (ie - sling models) or JS USE API.

1 reply

smacdonald2008
smacdonald2008Accepted solution
New Participant
March 23, 2018

Where are you defining the variable in {}.

THis does not look right. IN HTL - normally these objects are set on Java backend (ie - sling models) or JS USE API.