I was wondering if it's possible to translate portions of the page where there are HTML tags within the text.
Example:
<p i18n="@@genericError">
Please Try again or <a href="https://help.companyx.com">get in touch</a> with us for help.
</p>
My translation file looks like this:
<trans-unit id="genericError" datatype="html">
<source>
Please Try again or <x id="START_LINK" ctype="x-a" equiv-text="<a>" />get in touch<x id="CLOSE_LINK" ctype="x-a" equiv-text="</a>" /> with us for help.
</source>
<target>
Por favor tente novamente ou <x id="START_LINK" ctype="x-a" equiv-text="<a>" />entre em contato<x id="CLOSE_LINK" ctype="x-a" equiv-text="</a>" /> conosco.
</target>
</trans-unit>
When I try to run my project with ng serve I get the following error:
ERROR in Unknown placeholder START_LINK
I checked online (https://github.com/angular/angular/issues/25242) and if I understood correctly, it seems like HTML is not meant to be embed to the translation files.
Do you guys have any workaround for that?
Thanks you!