I am using v10 of react-i18next
and the latest Trans
component to have a translation string with a portion of the sentence bolded.
In the HTML I can insert a
to ensure there is a space between the <strong>
block and the rest of the sentence but it gets stripped out in the translation string.
JSX file:
<Trans i18nKey="free_trial_enabled">
<strong>30 Day Free Trial enabled</strong> for all users
</Trans>
JSON translation key/value file:
"free_trial_enabled": "<0>30 Day Free Trial enabled</0> for all users",
Output HTML:
<strong>30 Day Free Trial enabled</strong> for all users
Which looks like: '30 Day Free Trial enabledfor all users'
How can I preserve the
in the translation string so the space after the strong
block will be there?