Setting up multilingual filters consists of two parts: configuring the desired languages and translating the filters. Follow the steps for each part.
Configuring languages
Before you can translate, you must activate the languages you need for your Tweakwise instance.
Navigate to Settings.
Click on Add a language.
3. Choose the desired language(s) from the list. Specify which language is used in the search algorithm under Algorithm language. Under Code, enter the unique code for the language. This code can be used as the value for tn_lang in the Tweakwise API.
4. Click Save.
Translating filters
Once the languages are configured, you can start translating in the Filter Template module.
Navigate to Filtering > Filter Templates and open the template you want to edit.
Open a filter.
Click on + Show translations.
4. Enter the translation in the field labeled Enter a name.
5. Save the translations for the filter and then save the complete filter template.
Tweakwise will now deliver the correct translations via the API, based on the tn_lang parameter sent in your requests.
Important notes β οΈ
FTS language linking: If you create a unique custom language (such as Flemish), always link it to an existing FTS (Full Text Search) language (e.g., Dutch). The FTS language governs the logic (such as how the search engine sorts the words), while your new language is used purely for the texts (display).
API parameter: The translations are only visible on your webshop if you send the parameter
tn_langin your API request. Without this parameter, Tweakwise reverts to the default language of your instance.Number of languages: You can create an unlimited number of languages, but only translate the languages you actually use on your webshop.
FAQ β
How does Tweakwise know which translation to display?
Tweakwise looks at the language parameter you send in the request (
tn_lang). If the value in that parameter (e.g.,en) matches an activated language, that translation is displayed.What happens if I activate a language but forget to enter the translations?
If a translation is missing, the API reverts to the default language configured for your Tweakwise instance. For example, you might see the English name, even if the rest of the website is Dutch.
Does this affect the performance of my filters?
No. The translations are stored in the template, and the API simply delivers the correct string. This has no negative impact on the loading speed of your filters.