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

SOLVED

how to directly add i18n key in my htl code

keerthana_hn
Level 3
Level 3

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
Bimmi_Soi
Correct answer by
Community Advisor
Community 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

0 Replies
Arun_Patidar
Community Advisor
Community Advisor

Hi,

please find the example below :

 

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

Dipti_Chauhan
Community Advisor
Community Advisor

Hi @keerthana_hn 

 sharing one example : ${'KEY_NAME' @i18n}

 

Thanks

Dipti

Bimmi_Soi
Correct answer by
Community Advisor
Community 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