Using emojis in the client.yml file

I’m trying to add emojis in the client.en.yml file. What I tried:

en:
  js:
	my_plugin:
	  likes:
		one: ":heart: <b>{{count}}</b>"
		other: ":heart: <b>{{count}}</b>"

But it just prints :hearts: 5.
Is there a way to this this?
Thank you :slight_smile:

EDIT: I also tried to replace it with fontawesome

        other: "<i class='fa fa-heart'></i> <b>{{count}}</b>"

But it shows nothing

1 Like

You need to run the unescape emoji on the client side. Not all strings that are passed to the client run through that method.

4 Likes