Expand my Community achievements bar.

SOLVED

how to directly add i18n key in my htl code

Avatar

Level 5

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}" />



Arun Patidar

Avatar

Community Advisor

Hi @keerthana_hn 

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

 

Thanks

Dipti

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