I ran into a problem using the t() function where my url generated using the l() function was coming through as
<a href="http://www.bbc.co.uk">BBC</a>
I discovered that it was because I was using the wrong placeholder.
Placeholders in Drupal t() function
There are three special varaible placeholders in Drupal which are used in the t() function. They are intended to signal different types of variables to be replaced in translation string.
- ! - The text should beinserted 'as is'. This is useful if you are passing in a url via the l() function.
- @ - the text should be run through check_plain
- % - the string should be highlighted with theme_placeholder()
See the API documentation about the Drupal t() function for more details.
Bookmark/Search this post with: