How to validate locale in HTML code with HTL | Community
Skip to main content
Level 2
January 17, 2018
Solved

How to validate locale in HTML code with HTL

  • January 17, 2018
  • 1 reply
  • 1113 views

Good afternoon!!

     I am using HTL and I have to validate in the HTML code which is the my page's locale with data-sly-test. Is it possible? and if yes, How is the best way I can do this?

Thank you in advance!!!

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 edubey

In order to retrieve value you can use any of these

${currentPage.language.toString}

${currentPage.language.language}

Just in case you need API references-

https://helpx.adobe.com/experience-manager/6-3/sites/developing/using/reference-materials/javadoc/com/day/cq/wcm/api/Page.html#getLanguage()

1 reply

edubey
edubeyAccepted solution
Level 10
January 17, 2018

In order to retrieve value you can use any of these

${currentPage.language.toString}

${currentPage.language.language}

Just in case you need API references-

https://helpx.adobe.com/experience-manager/6-3/sites/developing/using/reference-materials/javadoc/com/day/cq/wcm/api/Page.html#getLanguage()