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 || {});}
App limitations
💡 While Boost AI Search & Discovery works diligently to ensure compatibility with various third-party apps and services, we have identified some constraints that may impact the full functionality of the Weglot translator integration. These limitations are specific to our app and are not reflective of any shortcomings on the part of Weglot translator.
Class must be manually added
To integrate with the Weglot app, you must manually add the classes that correspond to the features of Boost AI Search & Discovery.
Boost AI Search & Discovery's Synonym can only work with the original language of your store
Once integrated, Weglot translator displays a single translation for the original word, for instance, in the Product tile, if a customer searches using the exact translation, the corresponding product will be shown.
However, if the customer enters a similar word that does not precisely match the translation, the product title will not match, resulting in the product not being displayed to the customer.
Translations may not work as intended
But no worries, It is possible to edit your translation by clicking on any field and selecting the corresponding column on the right side if it is not translated as accurately as you require.
For more information on how to edit your translations, please follow this article.
Rest assured, we're actively working on addressing these limitations and improving the integration's performance to provide accurate and comprehensive translations for your store. We appreciate your understanding and patience as we continue to enhance our app's capabilities.
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.