react-i18next icon indicating copy to clipboard operation
react-i18next copied to clipboard

[Help Wanted] HTML entities without having to Interpolate every translation

Open Stansbridge opened this issue 9 years ago • 5 comments

Our content editors are not particularly tech orientated. This has caused us an issue where they would like to use various html entities inside a translation.

If we do not wrap every key with Interpolate then React will (quite rightly) escape the entities.

We were wondering if there are any recommendations, tips or tricks to deal with or avoid this problem?

Stansbridge avatar May 05 '17 15:05 Stansbridge

what we do is try to use markdown in such cases.

something like https://github.com/rexxars/react-markdown

in combination with http://locize.com ;)

jamuhl avatar May 05 '17 16:05 jamuhl

Thanks @jamuhl

Do you separate Markdown from your text nodes?

Stansbridge avatar May 09 '17 09:05 Stansbridge

what you mean by separate?

jamuhl avatar May 09 '17 09:05 jamuhl

regarding the resource file we have those mixed.

looking at components we use markdown only where needed.

jamuhl avatar May 09 '17 09:05 jamuhl

regarding the resource file we have those mixed. looking at components we use markdown only were needed.

Thanks this is really useful to know and helpful!

Stansbridge avatar May 09 '17 10:05 Stansbridge