Adding locales
Locales allow to display product names in different languages, depending on the language of your website.
Please follow our instructions below to enable locales for your Visualizer.
First of all, prepare a .csv file for each locale. Upload both the .csv file and the ZIP archive with the product images as a regular product import in your PIM account.
Please feel free to contact us at support@wizart.ai if you need our assistance with prepping the files for you and/or importing them.
To enable all the changes on your websites as well, please add a few lines of code to the integration code, depending on the integration option (i.e. floating button, entry-point-button).
Please check the parameters, for example, the ones from the Floating button page.
For example, in case you used the First integration option, please add data-parameters
to your code:
Having added the parameter to the integration code, enter the locales: data-parameters='{"locale":"en"}'
.
For example:
<script
class="wizart__floating-button"
data-token="token"
data-parameters='{"locale":"en"}'
src="https://d35so7k19vd0fx.cloudfront.net/production/integration/floating-button.min.js"
></script>
If you are using Second integration option, please add parameters
to your code.
Having added the parameter to the integration code, enter the locales: parameters: '{"locale":"en"}'
.
For example:
const floatingButton = new window.WFloatingButton({
element: document.getElementById("0000"),
token: "token",
});
floatingButton.render({
insertElementPosition: "before",
parameters: {
'{"locale":"en"}',
},
});