As customers are using Tweakwise Search on your e-commerce platform, you want the best possible results as outcome of the search query. In order to achieve this, understanding languages is essential.
If Tweakwise knows which language is requested, we can apply word transformations like:
- Plurals: bike - bikes
- Verb conjugations: bikes - biked - biked
- Splits: raincoat: rain - coat
It will also consider conjugations of the result of this split (rain - rains - rained)
Conjugations are determined based on Microsoft Full Text Forms or Inflectional and only work for existing words in the Full Text dictionaries. If the query contains symbols other than letters, it will not be conjugated.
Tweakwise will apply conjugations on given search terms as long as the language is set in the request-endpoint via a GET-parameter tn_lang
.
Important: if you know for certain that your customer is searching/typing in a specific language, make sure that you pass the ISO2 code for in the tn_lang
parameter.
For example, in case of English, pass "en":
https://gateway.tweakwisenavigator.net/navigation-search/?tn_q=bike&tn_lang=en
Default language
By default, the Dutch language ('nl') will be applied in case the tn_lang
is not provided. This only works if Dutch is enabled for your specific Tweakwise instance. If the Dutch language is not available, we use the first available language. The first available language is determined based on the identifiers described in this list provided by Microsoft.
Frontend API
To check which languages are available for a specific Tweakwise instance, the Frontend API should be requested through the catalog/languages endpoint.
The language parameter tn_lang
is available and recommended to use in the following endpoints of our Frontend API
- Autocomplete >
autocomplete
- Autocomplete >
grouped autocomplete
- Navigation search >
search
- Navigation search >
grouped search
- Suggestions >
suggestions
- Suggestions >
suggestions grouped
- Suggestions >
suggestion products
- Suggestions >
suggestion products grouped