Weglot Integration Guide
📖 Weglot helps you to grow and increase your business by adding new languages to your store. Here is the guide for Weglot Integration with Boost AI Search & Discovery app.
On this page
About Weglot
1
App Information
- Weglot helps you to grow and increase your business by adding new languages to your store.
- App details: https://apps.shopify.com/weglot
2
Integration Function
- Translate your websites' filter options/values as well as Search/Suggestion into different languages.
How to integrate Weglot with Boost AI Search & Discovery
This feature only works with Boost AI Search & Discovery V2 and above. To find out which version of our app your store's current theme is installed with, please follow this article.
Integrate with Filter trees & Product list


Select one of the Versions below for the app version that your theme is installed with (if you have not known it, yet, please follow this article to find out):V2 or V3. Then follow its corresponding Step 4.
.boost-pfs-filter-option-value,.boost-pfs-filter-option-title-text,.boost-pfs-filter-top-sorting,.boost-pfs-filter-option-item,
- Instant Search
.boost-sd__header-item, .boost-sd__suggestion-queries-link, .boost-sd__suggestion-queries-item-title, .boost-sd__view-all-text, .boost-sd__search-form-title
- Banner & Toolbar
.boost-sd__header-title, .boost-sd__header-description, .boost-sd__view-as-text, .boost-sd__product-count, .boost-sd__sorting-label, .boost-sd__sorting-button, .boost-sd__sorting-option
- Filter tree
.boost-sd__filter-option-title, .boost-sd__filter-option-item-button, .boost-sd__product-title, .boost-sd__button
- Search page header result
.boost-sd__search-result-toolbar-panel, .boost-sd__search-result-toolbar-panel, .boost-sd__search-result-toolbar-item

Integrate with Search & Instant search
From your Shopify admin, go to Online Store > Themes.
Select one of the tab below for the app version that your theme is installed with (if you have not known it, yet, please follow this article to find out):V2 or V3. Then follow its corresponding Step 4.
V2


// Only send Weglot request if the current language is different from Englishfunction isWeglotActive() {
if (!window.Weglot || !window.Weglot.initialized) {
return false;
} else {
var currentLang = Weglot.getCurrentLang();
// Change 'en' to suitable with original language of the store
return currentLang !== 'en';
}}
InstantSearchApi.beforeCallAsync = function(searchTerm, callInstantSearchApi) {
// Then use it in our API
if (window.Weglot && window.Weglot.initialized && isWeglotActive()) { Weglot.search(searchTerm, function(englishTerm) { Globals.instantSearchQueryParams['q'] = englishTerm;
callInstantSearchApi();
});
} else {
callInstantSearchApi();
}}
V3
if (window.boostSDAppConfig) { window.boostSDAppConfig.integration = Object.assign({ languages: 'weglot' }, window.boostSDAppConfig.integration || {});}5 (V3)
Reference
- https://gist.github.com/nico2che/5c781358192773b16c89b868b4ac3c88
- https://developers.weglot.com/api/reference
If you encounter any issues during the integration process, please don't hesitate to contact our support team for further assistance at support@boostcommerce.net.