Translate html tag in magento 2
-
14-04-2021 - |
Pergunta
I have a html template with a string that's translated. The translation contains a html a tag. but the tag is printed as text when rendered.
.html file content:
<p>{{trans "footer_link_privacy"}}</p>
en_US.csv content:
"footer_link_privacy", "<a href=""/en/privacy-policy"">Privacy Policy</a>"
Solução
try with
{{trans "footer_link_privacy"|raw}}
Licenciado em: CC-BY-SA com atribuição
Não afiliado a magento.stackexchange