Nemo64 / meteor-translator

a feature rich internationalization (i18n) package for meteor with usage of the Unicode Common Locale Data Repository
MIT License
15 stars 4 forks source link

Request: support for embedded HTML #1

Open tanis2000 opened 9 years ago

tanis2000 commented 9 years ago

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!

Nemo64 commented 9 years ago

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 commented 9 years ago

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 ;).

tanis2000 commented 9 years ago

Yes, that's a good point.