Drupal - Should I use t() in a hook_menu's description?

See Strings at well-known places: built-in menus, permissions, log messages and .info files community documentation:

The Drupal 6 and 7 menu system stores menu item titles and descriptions in English. This allows the system to cache the data, but display to users using various languages on demand. For this to work, you should not use t() on the title or description of menu items in your hook_menu() implementation. Additionally, you should attempt to use a literal string (rather than a dynamic string) for these two keys, so the translation template extractor can find the string you used.

Emphasis mine.


If you see documentation of hook_menu arguments..

  • "title": Required. The untranslated title of the menu item.
  • "title callback": Function to generate the title; defaults to t(). If you require only the raw string to be output, set this to FALSE.
  • "title arguments": Arguments to send to t() or your custom callback, with path component substitution as described above.
  • "description": The untranslated description of the menu item.

By default title callback is t function.. So it is always translated..


Since Drupal 6 is not needed anymore.

Please read https://drupal.org/node/140311. Quoting that:

As of 6.x, Drupal internally handles the translation of menu titles and descriptions into the user's local language. Descriptions, if provided, are always translated with t(); there is no way to pass in additional data for placeholder substitution (in D5 and prior, passing in substitutions was a discouraged practice - with this change, the menu system enforces that rule directly). Titles are translated with t() by default, but t()-style string replacement is possible through the use of the new 'title arguments' property. You can also choose to replace t() with your own custom callback.