Open mattotodd opened 8 years ago
I'm interested in this too, would be nice to be able to add bold tags or other formatting on my translations
Did you check the code in the example directory? It probably has what you're looking for. You can see the code in action under http://react-translate-demo.martinandert.com/
Ah ha it looks like on line 100 there is an 'unsafe' parameter?
Ah ha it looks like on line 100 there is an 'unsafe' parameter?
Exactly. I probably should mention its usage in the Readme. That prop gets passed to react-interpolate-component, and IIRC this one has info on unsafe
in its Readme.
Some of our localized strings include markup because the actual translation process results in words (or words that we would like to have marked up) that change position
For example:
In English:
In German:
But these tags get stripped when I use this library, and i understand its an issue with setting markup directly with react. Breaking the phrase up in to smaller parts does not solve the issue because the composition of the parts depends on the language.
Any thoughts on how such a case could be solved?