Expand my Community achievements bar.

Enhance your AEM Assets & Boost Your Development: [AEM Gems | June 19, 2024] Improving the Developer Experience with New APIs and Events
SOLVED

How to validate locale in HTML code with HTL

Avatar

Level 2

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!!!

1 Accepted Solution

Avatar

Correct answer by
Level 10

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/co...

View solution in original post

1 Reply

Avatar

Correct answer by
Level 10

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/co...