From 9166d123fdf87d880c89fce5ad3b321e847b1b4e Mon Sep 17 00:00:00 2001 From: amontero Date: Sun, 11 Nov 2012 19:41:48 +0100 Subject: [PATCH] Improvement to l() function docs --- core/includes/common.inc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/core/includes/common.inc b/core/includes/common.inc index f1a7ce0..89fb532 100644 --- a/core/includes/common.inc +++ b/core/includes/common.inc @@ -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 settings 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 -- 1.7.9.5