[development] t() API documentation

sivaji j.g sivaji2009 at gmail.com
Tue Feb 15 09:55:16 UTC 2011


t() API documentation reads "Avoid escaping quotation marks wherever possible".

Below is the snippet from

  $output .= t('Don\'t click me.');

  $output .= t("Don't click me.");

However the core user module's hook_block implementation is following
incorrect style. The same is the case with D7 user module as well.

I think the purpose of avoiding t('Don\'t click me.'); style is just
to make it more readable and easier for translation.

Is there any reasons for encouraging incorrect style in core. Please
enlighten me on this.

+91 9941 571 690

More information about the development mailing list