Translate html tag in magento 2
-
14-04-2021 - |
Domanda
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>"
Soluzione
try with
{{trans "footer_link_privacy"|raw}}
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a magento.stackexchange