3

I want to translate a sentence with i18n within an express app using a google cloud function. Everything works despite that special characters are transformed into HTML special notation.

  var  STRING_TO_TRANSLATE = "{{name}} is here",
  var translation = i18n.__(STRING_TO_TRANSLATE, {
    name: "A & B"
  });

This results in a translation "A & amp; B is here".

The expected result would be "A & B is here".

As I'm not using the translation in an HTML context, thus I need to get rid of the & amp. Any idea how to configure i18n to skip the HTML special character handling?

Thomas
  • 31
  • 1

0 Answers0