HTML tags in i18next translation

前端 未结 8 1434
小鲜肉
小鲜肉 2020-12-08 18:30

I\'m using i18next to power i18n for my weblog. It works great on text-only content, but when I try to translate content that includes HTML markup, it is displaying the raw

8条回答
  •  余生分开走
    2020-12-08 18:51

    You can turn off the escaping during initialization globally:

    i18n.init({
      // ...
      interpolation: {
        escapeValue: false,
      }
    });
    

提交回复
热议问题