Last active
May 12, 2019 18:28
-
-
Save BenRichter/62800f61d1a23b15eb37c31be2531021 to your computer and use it in GitHub Desktop.
Symfony Twig Translation with link
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<trans-unit id="translation.id"> | |
<source>translation.id</source> | |
<target>Some text <![CDATA[<a href="%link%">%link_text%</a>]]> end of sentence.</target> | |
</trans-unit> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% set string_trans = 'string'|trans %} | |
<strong>{{ 'translation.id'|trans({'%link%': path('symfony_path'), '%link_text%': string_trans})|raw }}</strong> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment