How to translate Searchanise widgets

Modified on: Mon, Oct 29, 2018 at 2:48 PM


1. Instant search widget


You can find the translations for the following elements of the instant search widget in the Searchanise admin panel -> Instant search widget -> Translations section:


  • section titles,
  • product labels,
  • messages,
  • placeholders.



2. Search results widget


If you use the Searchanise search results widget, here is how to translate its elements.


2.1. Widget content


To translate the following elements go to Searchanise admin panel -> Search results widget -> Translations:


  • section titles,
  • product labels,
  • sortings,
  • buttons,
  • messages.



2.2 SEARCH RESULTS title


For Magento 1:


  • Go to the /app/locale/en_US/Simtech_Searchanise.csv file and edit the second 'Search results' text in the following line:


           "Search results", "Search results"


            Let's suppose you'd like to replace the 'Search results' text with the 'Résultats de recherche' one. In this case the appropriate line should look like this:       

           "Search results", "Résultats de recherche"


  • Then clear the cache in Magento admin panel -> System -> Cache Management section (use the Flush Magento Cache button).


For Magento 2:


  • Go to <intall_module_dir>/Controllers/Result/Index.php file and edit the "Search results" part of the following line:

    $page->getConfig()->getTitle()->set(__("Search results"));

    There can be two variants for the <intall_module_dir> part depending on the installation process. It can be app/code/Searchanise/SeachAutocomplete or  vendor/searchanise/search-autocomplete.


           Let's suppose you'd like to replace the 'Search results' text with the 'Résultats de recherche' one. In this case the appropriate line should look like this:


           $page->getConfig()->getTitle()->set(__("Résultats de recherche"));


  • Then clear the cache in Magento admin panel -> System -> Cache Management section (use the Flush Magento Cache button).


2.3 Filter titles 




To translate filter titles do the following:

2.3.1 Go to Searchanise admin panel -> Filters and click Edit filters.

2.3.2 Change filter titles and save the changes.



Filter options correspond to the product attributes that can be found in Magento admin panel -> Catalog -> Attributes (for Magento 1) and Magento admin panel -> Stores -> Attributes (for Magento 2) sections. Just click on the necessary attribute to edit it.



3. Magento default search results page


If you choose to use the default Magento template for showing search results, here is how to translate its elements.


3.1 Relevance sorting  




For Magento 1:


  • Go to the /app/locale/en_US/Simtech_Searchanise.csv file and edit the second 'Relevance' text in the following line:


           "Relevance", "Relevance"


            Let's suppose you'd like to replace the 'Relevance' text with the 'Actualité' one. In this case the appropriate line should look like this:       


           "Relevance", "Actualité"


  • Then clear the cache in Magento admin panel -> System -> Cache Management section (use the Flush Magento Cache button).


For Magento 2:


  • Go to vendor/magento/module-catalog-search/i18n/en_US.csv file and edit the "Relevance" part of the following line:

    Relevance,Relevance

           Let's suppose you'd like to replace the 'Relevance' text with the 'Actualité' one. In this case the appropriate line should look like this:  


           Relevance,Actualité


  • Then clear the cache in Magento admin panel -> System -> Cache Management section (use the Flush Magento Cache button).


3.2 All the other elements are translated through the default Magento language variables. Here is the example of how you can localize Magento. 


Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.