Translating Searchanise on Magento 2

You can translate or change the text of:

Instant Search Widget

You can translate or change the text of the following Instant Search Widget‘s elements:

  • Section labels: Categories, Products, Pages
  • Product labels: SKU, In stock, Pre-Order, Out of stock, etc.
  • Messages
  • Search input placeholders for desktop and mobile

You can also translate or change the text of the Sticky Widget‘s search input placeholder.

Steps:

  1. Go to the Searchanise control panel > Translations & Texts section > Instant Search Widget tab.
  2. Type the phrases you’d like to display instead of the original ones into the corresponding fields. If you leave a field empty, the text won’t be shown in the widget.
  3. Apply the changes.
Translating Searchanise on Magento 2

Search Results Widget

Widget’s content

You can translate or change the text of the following Search Results Widget‘s elements:

  • Product labels:  SKU, In stock, Pre-Order, Out of stock, etc.
  • Button and link labels
  • Section labels (tabs): Categories, Products, Pages
  • Sorting values
  • Quick view elements: “Quick View” button + “Quick view” popup’s elements
  • Pagination on Mobile
  • SEO data of the page
  • Messages

Steps:

  1. Go to the Searchanise control panel > Translations & Texts section > Search Results Widget tab.
  2. Type the phrases you’d like to display instead of the original ones into the corresponding fields. If you leave a field empty, the text won’t be shown in the widget.
  3. Apply the changes.
Translating Searchanise on Magento 2

Widget’s title

To change the widget’s title, follow these steps:

  1. Go to [intall_module_dir]/Controllers/Result/Index.php file.
    Note

    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”.

  2. Edit the “Search results” part of the following line:
    $page->getConfig()->getTitle()->set(__("Search results"));
    Tip

    If you want to replace the “Search results” text with the “Résultats de recherche” one, the code line should look like this: 

    $page->getConfig()->getTitle()->set(__("Résultats de recherche"));		
  3. Save the changes.
  4. Clear the cache in the Magento 2 admin panel > System > Cache Management by clicking the Flush Magento Cache button in the top-right corner.

Filters

You can edit filters’ titles as well as their values’ names.

To edit filters’ titles, follow these steps:

  1. Go to the Searchanise control panel > Filters > Filter list > Filters tab.
  2. Click the Edit filters button in the top-right corner.
  3. Edit the filters’ titles in the Title column.
  4. Save the changes.
Translating Searchanise on Magento 2

That’s it. You can now go to the storefront if you’d like to make sure filters’ titles are up-to-date.

To edit the names of filters’ values, follow these steps:

Note

Filter values (options) correspond to the product attributes that can be found in Magento 2 admin panel > Stores > Attributes.

  1. Go to Filters > Filter list > Filters tab.
  2. Click the pencil icon in the filter row whose values you’d like to rename.
  3. Click the Edit values button in the top-right corner.
  4. Edit the values’ names in the Display name column.
  5. Save the changes.
Translating Searchanise on Magento 2

That’s it. You can now go to the storefront if you’d like to make sure the values’ names are up-to-date.

Default Search Results Page

If you choose to use the default Magento Search Results page for displaying search results, its elements are translated through the default Magento language variables. See the Magento instructions.

Enjoying your experience with Searchanise?

We’d appreciate it if you could take some time to leave a review.

Updated on January 4, 2024

How useful was this post?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate this post.

We are sorry that this post was not useful for you

Let us improve this post!

Please tell us how we can improve this post

Related Articles

Back to top