Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

[AEM Gems Webinar] Accelerating Experience Manager as a Cloud Service development with Rapid Development Environments
SOLVED

how to directly add i18n key in my htl code

Avatar

Level 4

Hi,

 

I need to use i18n key in my htl for a text. How can I add it?

I added "${authorprofile.followme.default @i18n,context='html'}" b/w div class its not working. How should I add it?

 

Thank you

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

Hi @keerthana_hn 

 

Please try as below.

It will work in div also.

 

<div data-sly-test.default="${'authorprofile.followme.default' @ i18n}" />

 

Let me know if still any issue.

 

Hope that helps!!

Thanks

 

 

 

View solution in original post

3 Replies

Avatar

Community Advisor

Hi,

please find the example below :

 

<sly data-sly-test.emptyTitle="${'myproject.component.empty' @ i18n}" />

Avatar

Correct answer by
Employee Advisor

Hi @keerthana_hn 

 

Please try as below.

It will work in div also.

 

<div data-sly-test.default="${'authorprofile.followme.default' @ i18n}" />

 

Let me know if still any issue.

 

Hope that helps!!

Thanks