how to directly add i18n key in my htl code

Avatar

Avatar
Boost 5
Level 2
keerthana_hn
Level 2

Likes

6 likes

Total Posts

31 posts

Correct reply

0 solutions
Top badges earned
Boost 5
Boost 3
Boost 1
Validate 1
View profile

Avatar
Boost 5
Level 2
keerthana_hn
Level 2

Likes

6 likes

Total Posts

31 posts

Correct reply

0 solutions
Top badges earned
Boost 5
Boost 3
Boost 1
Validate 1
View profile
keerthana_hn
Level 2

20-07-2021

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

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Affirm 25
Level 5
Bimmi_Soi
Level 5

Likes

72 likes

Total Posts

78 posts

Correct reply

26 solutions
Top badges earned
Affirm 25
Contributor
Applaud 5
Boost 50
Ignite 1
View profile

Avatar
Affirm 25
Level 5
Bimmi_Soi
Level 5

Likes

72 likes

Total Posts

78 posts

Correct reply

26 solutions
Top badges earned
Affirm 25
Contributor
Applaud 5
Boost 50
Ignite 1
View profile
Bimmi_Soi
Level 5

20-07-2021

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

 

 

 

Answers (2)

Answers (2)

Avatar

Avatar
Boost 100
Level 6
Dipti_Chauhan
Level 6

Likes

114 likes

Total Posts

135 posts

Correct reply

40 solutions
Top badges earned
Boost 100
Give Back 10
Affirm 25
Boost 50
Boost 25
View profile

Avatar
Boost 100
Level 6
Dipti_Chauhan
Level 6

Likes

114 likes

Total Posts

135 posts

Correct reply

40 solutions
Top badges earned
Boost 100
Give Back 10
Affirm 25
Boost 50
Boost 25
View profile
Dipti_Chauhan
Level 6

20-07-2021

Hi @keerthana_hn 

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

 

Thanks

Dipti

Avatar

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,440 likes

Total Posts

3,311 posts

Correct reply

941 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,440 likes

Total Posts

3,311 posts

Correct reply

941 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile
Arun_Patidar
MVP

20-07-2021

Hi,

please find the example below :

 

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