When initializing Teral, using the init method, you need to pass a config object. Below are the different options you can use:
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 (example.com/foo/ and example.com/bar/) 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 https://teral.crunch.help/setup-instructions/how-to-use-a-custom-html-to-customize-the-language-switcher
This is a boolean value that specifies whether to enable debugging mode or not. This defaults to false. This field is optional