Commit a10a1cfc authored by David Rothstein's avatar David Rothstein
Browse files

Issue #2640344 by rafaolf, mohit_aghera, GrigoriuNicolae, jhodgdon: Document...

Issue #2640344 by rafaolf, mohit_aghera, GrigoriuNicolae, jhodgdon: Document how to make hook_search_info() titles translatable
parent aa232a21
Loading
Loading
Loading
Loading
+6 −2
Changes for modules/search/search.api.php: 6 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -30,8 +30,9 @@
 *
 * @return
 *   Array with optional keys:
 *   - title: Title for the tab on the search page for this module. Defaults
 *     to the module name if not given.
 *   - title: Title for the tab on the search page for this module. Title must
 *     be untranslated. Outside of this return array, pass the title through the
 *     t() function to register it as a translatable string.
 *   - path: Path component after 'search/' for searching with this module.
 *     Defaults to the module name if not given.
 *   - conditions_callback: An implementation of callback_search_conditions().
@@ -39,6 +40,9 @@
 * @ingroup search
 */
function hook_search_info() {
  // Make the title translatable.
  t('Content');

  return array(
    'title' => 'Content',
    'path' => 'node',