Change the widget language dynamically

Loïc
Loïc
  • Updated

You dynamically change the language of your website (without reloading the page)? Then you will have to change the version of your Axeptio widget at the same time!

Wherever you do your language change in Javascript, you will have to add the Axeptio function axeptioSDK.setCookiesVersion(), to change the version of the widget dynamically.

This function takes as a parameter the identifier of the version to load.

For example, I have three versions here:Capture_d__cran_2022-09-13___10.46.25.png

The IDs of my three versions are "axeptio-en", "axeptio-fr", and "axeptio-it".

If I translate my site into Italian, I will just have to call then the axeptioSDK.setCookiesVersion('axeptio-it') function.

Was this article helpful?

4 out of 8 found this helpful