Javascript SDK

  1. Home
  2. Docs
  3. Javascript SDK
  4. Configuration


When initializing Teral, using the init method, you need to pass a config object. Below are the different options you can use:

  • apiKey
  • sourceLanguage
  • currentLanguage
  • excludePaths
  • ignoreClasses
  • hideSwitcher
  • debug


This is the apiKey that represents your website. You can find it the project settings in your account. This field is required.


This is the original language your site is in. This is optional.


This is the currently translated language your site is in, This field is optional. If you would like to translate the page by default simply set this value.

For example to translate the site to french by default we can set it to fr.


An array of paths to not translate. This is optional.

For example, if do not want the following sections ( and of your site to not be translated, you could pass the following array [“/foo“, “/bar“]


This is an array of CSS classes of elements that should not be translated. This field is optional.

For example, if you have a CSS class called userData that you do not want to translate, simply pass this array [“userData“]


This is a boolean value used to hide the default language switcher. This defaults to false and is optional. If you would like to hide the default language switcher, simply set it to true. For more information about using a custom language switcher, please


This is a boolean value that specifies whether to enable debugging mode or not. This defaults to false. This field is optional

Was this article helpful to you? Yes No

How can we help?