Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HTML tags in XML translation

How to add statements like the following one to translation (XLIFF format):

Click <a href='http://example.com'>here</a> to continue.
like image 422
seferov Avatar asked Jul 11 '12 11:07

seferov


2 Answers

Could you put it in a CDATA field within the xml? http://en.wikipedia.org/wiki/CDATA

like image 148
Petter Soderlund Avatar answered Sep 22 '22 19:09

Petter Soderlund


In Twig, you can include translation and disable autoescape, but you have to keep control of its content as it could be a security lack...

{% autoescape false %}{{ 'your.translation.id'|trans }}{% endautoescape %}
like image 29
AlterPHP Avatar answered Sep 25 '22 19:09

AlterPHP