meteor-translator icon indicating copy to clipboard operation
meteor-translator copied to clipboard

Request: support for embedded HTML

Open tanis2000 opened this issue 11 years ago • 3 comments

It would be great if I could add in the translations some HTML tags like strong, i, etc.. so that formatting can be applied without having to split the string into many smaller strings. Is that something that can already be achieved or that could be added?

Thanks!

tanis2000 avatar Jul 14 '14 13:07 tanis2000

You should be able to use the raw output method of blaze, eg: {{{trans "user_area.message.greeting" name="world"}}}. Haven't tested it right now but it should work. This package returns strings. What you do with it is up to you ;)

Nemo64 avatar Jul 15 '14 14:07 Nemo64

After some thought, i think i could add more functionality for that case. The problem with printing it unescaped is that variables you pass aren't escaped too. My current idea is, that the helper could return dom nodes. I have other priorities right now, but i leave this open so i don't forget ;).

Nemo64 avatar Jul 19 '14 11:07 Nemo64

Yes, that's a good point.

tanis2000 avatar Jul 20 '14 08:07 tanis2000