Commit 6c4911e0 authored by jhodgdon's avatar jhodgdon

Issue #1837840 by amontero, tstoeckler: Add clarification to l() docs as to when to use t() instead

parent ce851476
......@@ -2269,6 +2269,14 @@ function drupal_http_header_attributes(array $attributes = array()) {
* internal links output by modules should be generated by this function if
* possible.
*
* However, for links enclosed in translatable text you should use t() and
* embed the HTML anchor tag directly in the translated string. For example:
* @code
* t('Visit the <a href="@url">settings</a> page', array('@url' => url('admin')));
* @endcode
* This keeps the context of the link title ('settings' in the example) for
* translators.
*
* @param string $text
* The translated link text for the anchor tag.
* @param string $path
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment