Search code examples
angularangular-i18nangular-localize

How to escape curly braces in Angular's $localize function?


If i try to translate the following text:

{example}

like this:

$localize`{example}`

The text will disappear in the translated build.

Is there a way to escape the curly braces?


Solution

  • Try writing:

           $localize`${'{'}example}`