Language support / translations

As customers use Tweakwise Search on your e-commerce platform, it’s essential to provide the best possible search results while ensuring the user interface is fully adapted to the active language.

Usage

In Tweakwise JS, this can be configured using the lang option.

tweakwiseSuggestions({
  //...
  lang: "en"
});

Supported languages

The following table list the languages that Tweakwise supports for our pre-built UI:

Language + code
English - en
Dutch - nl
German - de
Spanish - es
French - fr
Italian - it

For detailed information on language support in Tweakwise API, see API Language support.

Overriding translations

If you prefer to use a different translation for a predefined language, you can override it using the translations option.

Example: using alternate translations in English

tweakwiseSuggestions({
  //...
  translations: {
    'en': {
      'Show results': 'Show all results'
    }
  }
});

Available translation keys can be found in Search & Merchandising Options.

Adding languages

To add a new language, enter the language code in the lang option (preferably ISO2) and add the corresponding translations to the translations option.

Example: adding Welsh

tweakwiseSuggestions({
  //..
	lang: "cy",.
  translations: {
    'cy': {
      'Show results': 'Dangos canlyniadau'
    }
	}
});

Available translation keys can be found in Suggestions Options.