Issue #1837840 by amontero, tstoeckler: Add clarification to l() docs as to when to use t() instead
parent
a6ecde70a9
commit
a60b8dec7a
|
@ -2379,6 +2379,14 @@ function drupal_attributes(array $attributes = array()) {
|
||||||
* internal links output by modules should be generated by this function if
|
* internal links output by modules should be generated by this function if
|
||||||
* possible.
|
* 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
|
* @param string $text
|
||||||
* The translated link text for the anchor tag.
|
* The translated link text for the anchor tag.
|
||||||
* @param string $path
|
* @param string $path
|
||||||
|
|
Loading…
Reference in New Issue