How to translate the search popup created by Amasty Advanced Search?
The stores often have multiple views for different languages. The Amasty extensions are easy to translate using the following article - How to translate a Magento 2 extension?
However, there are peculiarities associated with the translation of the Advanced Search popup, since the translations of the JS files are stored in the js-translation.json file located in
pub/static/frontend/*theme_vendor*/*theme_name*/*locale_name*/js-translation.json
If the Magento operation mode is set to Developer, this file is generated only when it doesn’t exist in the static files. In the Production mode, the file is not changed even after changing translations in locale_locale.csv files and flushing the cache. In this regard there is a number of additional steps to be followed after modifying the files in the i18n directory:
1. In the Developer mode, it will be enough to delete the js-translation.json file and clean the cache.
2. In the Production mode, it is required to regenerate static content. This can be achieved by executing the following commands in CLI from the Magento root directory:
rm -rf pub/static/*
php bin/magento set:static-content:deploy
php bin/magento cache:flush
Related Articles
What's the difference between Advanced Search and Elastic Search?
In our catalog, we offer two search extensions for Magento 2 - Advanced Search and Elastic Search. Both of them are aimed at improvement of the search process but the functionality differs. Elastic Search consists of several components, including the ...
I don't need the autocomplete popup, how do I disable it?
The autocomplete popup is the functionality of the Advanced Search module, which is a dependent component in the Elastic Search extensions. You can disable the Advanced Search module by running this command: php bin/magento mod:dis Amasty_Xsearch -f
Advanced Search API
1. Amasty\Xsearch\Api\SearchInterface GET /V1/amsearch, method="search"
Elastic Search and Advanced Search | GraphQL methods
Queries xsearchProducts (search: String) description: products matching customers' search query xsearchRelatedTerms (search: String) description: get related search terms by query xsearchRecentlyViewed description: get an array of recently viewed ...
Why should I use your module instead of Magento Elastic Search?
Starting from version 2.4, Magento works with the Elastic Search that greatly impacts the overall performance of the website. Using Elastic Search as a search engine provides faster page loading and more relevant search results. Within the default ...