How do you want to handle links in translations #54
-
It is common to have link inside a translation. Multiple ways to handle it:
What is the better option for you @kevinpapst? |
Beta Was this translation helpful? Give feedback.
Answered by
kevinpapst
Jan 11, 2022
Replies: 1 comment 4 replies
-
I don't like any of these options (but 1 & 2 definitely not). Why not {{ 'foo %link%'|trans({ '%link%': '<a href="https://.../discussions/54">' ~ ('Test'|trans) ~ '</a>' }, 'messages')|raw }} ?
|
Beta Was this translation helpful? Give feedback.
4 replies
Answer selected by
cavasinf
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I don't like any of these options (but 1 & 2 definitely not).
Why not
?
Another option is to rephrase your translation and simply append the URL to the end of the translation.