You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As stated in Formatjs docs, "by allowing embedding XML tag we want to make sure contextual information is not lost when you need to style part of the string".
// without ignoreTag, react-i18next <Trans> translations with <0></0> placeholders// will fail to parse, as IntlMessageFormat expects them to be defined in the// options passed to fc.format() as { 0: (children) => string }// but the replacement of placeholders is done in react-i18nextfc=newIntlMessageFormat(res,lng,this.formats,{ignoreTag: true});
... but it would be nice to find a workaround, like adding { 0: (children) => string } or something.
The text was updated successfully, but these errors were encountered:
Beside that, why are you pointing exactly to the ignoreTag option? Would having that option set to false help for your use case? Can you elaborate on that?
Thank you for your answer. I was not aware that the Trans component has such a feature too...
I pointed to the ignoreTag option because I though that Rich Text Formatting was part of ICU and that ignoreTag was the option for deactivating it.
Things a clearer to me know, thank you.
🚀 Feature Proposal
I would like to use Rich Text Formatting.
Motivation
As stated in Formatjs docs, "by allowing embedding XML tag we want to make sure contextual information is not lost when you need to style part of the string".
Example
Note
I am aware of the comment in i18next-icu code...
... but it would be nice to find a workaround, like adding
{ 0: (children) => string }
or something.The text was updated successfully, but these errors were encountered: