martinandert / counterpart

A translation and localization library for Node.js and the browser.
MIT License
242 stars 25 forks source link

how to handle simple formatting like bold or italic #29

Closed timaschew closed 8 years ago

timaschew commented 8 years ago

Would like to emphasis some parts of the translation string. I don't see any possibility without using to Translate components. Would be very nice if Translate supports either raw HTML or supports some basic markdown syntax like _italic_ and __bold__ like this library here https://github.com/alexdrel/i18n-react

martinandert commented 8 years ago

When using react-translate-component (which itself uses counterpart), set the unsafe prop to true. See https://github.com/martinandert/react-translate-component/blob/master/spec.js for an example.

timaschew commented 8 years ago

thanks, that works ;)