Search code examples
drupal-7drupal-modulesdrupal-theming

search_api_page.inc Results - Text change


I need to change default text: " 'The search found 1 result in @sec seconds.', 'The search found @count results in @sec seconds.'," in search_api_page.inc file.

What's the best approach here in order not to change this module?


Solution

  • Since this comes preprocess function we can re-declare it in our custom module by simply coping the whole function from search_api_page.inc (function template_preprocess_search_api_page_results) of course rename the "template" with the name of your module and change text according to your needs. You can change the results as well as the "no results text there".

    Hope this helps!