Translate html tag in magento 2
-
14-04-2021 - |
質問
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>"
解決
try with
{{trans "footer_link_privacy"|raw}}
所属していません magento.stackexchange