Language & country
These settings apply to the Standard Widget and the MultiProduct Widget.
Each setting can be defined in two places:
- For the whole page, with a parameter in the URL of the script tag: it applies to every widget on the page.
- For a single widget, with a
data-*attribute on its element: it overrides the page setting for this widget only.
Values combine a language code (ISO 639-1) and a country code (ISO 3166), separated by a hyphen: for example en-GB for English in the United Kingdom.
See the supported locales at the end of this page.
Widget language
For the whole page
Set the widget language with the locale parameter of the script tag:
html
<script async src="https://widget.clic2buy.com/c2b.js?locale=en-GB"></script>For a single widget
To set the language of one widget, for example when buttons in different languages share the same page, add a locale attribute to its element:
html
<!-- Modal -->
<div data-widget-element data-widget-id="WIDGET_ID" data-widget-locale="LOCALE">
<!-- your button -->
</div>
<!-- Inline: on the button, not on the container -->
<div data-inline-trigger data-inline-href="REF" data-widget-id="WIDGET_ID" data-widget-locale="LOCALE">
<!-- your button -->
</div>
<!-- Inline auto-open -->
<div data-inline-container-auto-open data-widget-id="WIDGET_ID" data-widget-locale="LOCALE"></div>html
<!-- Modal -->
<div data-multiproduct-widget-element data-multiproduct-widget-id="MULTIPRODUCT_WIDGET_ID" data-multiproduct-widget-locale="LOCALE">
<!-- your button -->
</div>
<!-- Inline: on the button, not on the container -->
<div data-multiproduct-widget-inline-trigger data-multiproduct-widget-inline-href="REF" data-multiproduct-widget-id="MULTIPRODUCT_WIDGET_ID" data-multiproduct-widget-locale="LOCALE">
<!-- your button -->
</div>
<!-- Inline auto-open -->
<div data-multiproduct-widget-container-auto-open data-multiproduct-widget-id="MULTIPRODUCT_WIDGET_ID" data-multiproduct-widget-locale="LOCALE"></div>Retailer country
By default, the retailer country is the country of the widget locale: with fr-FR, the widget only locates visitors in France and shows retailers in France.
For the whole page
To show retailers from another country without changing the widget language, add a retailerLocale parameter to the script tag:
html
<script async src="https://widget.clic2buy.com/c2b.js?locale=en-GB&retailerLocale=fr-FR"></script>For a single widget
To set the retailer country of one widget, add a retailer locale attribute to its element:
html
<div data-widget-element data-widget-id="WIDGET_ID" data-widget-locale="LOCALE" data-widget-retailer-locale="RETAILERLOCALE">
<!-- your button -->
</div>html
<div data-multiproduct-widget-element data-multiproduct-widget-id="MULTIPRODUCT_WIDGET_ID" data-multiproduct-widget-locale="LOCALE" data-multiproduct-widget-retailer-locale="RETAILERLOCALE">
<!-- your button -->
</div>Several countries
A widget can cover several countries: visitors can be located in any of them, and find retailers in all of them.
WARNING
This needs retailer data for every country in the list. Check with your Customer Success Manager that this data is available before using it.
For the whole page
Add a retailerLocales parameter to the script tag, with the locales separated by commas:
html
<script async src="https://widget.clic2buy.com/c2b.js?locale=fr-FR&retailerLocales=fr-FR,fr-BE"></script>For a single widget
To set the countries of one widget, add a retailer locales attribute to its element:
html
<div data-widget-element data-widget-id="WIDGET_ID" data-widget-locale="LOCALE" data-widget-retailer-locales="fr-FR,fr-BE">
<!-- your button -->
</div>html
<div data-multiproduct-widget-element data-multiproduct-widget-id="MULTIPRODUCT_WIDGET_ID" data-multiproduct-widget-locale="LOCALE" data-multiproduct-widget-retailer-locales="fr-FR,fr-BE">
<!-- your button -->
</div>Inline auto-open
The retailer country settings (retailerLocale, retailerLocales and their data-* attributes) only apply to the modal and inline modes. In inline auto-open mode, the widget always shows retailers from the country of its locale.
Supported locales
| Country | Locales | |
|---|---|---|
| 🇩🇿 | Algeria | ar-DZ, fr-DZ |
| 🇦🇷 | Argentina | es-AR |
| 🇦🇺 | Australia | en-AU |
| 🇦🇹 | Austria | de-AT |
| 🇧🇪 | Belgium | fr-BE, nl-BE |
| 🇧🇷 | Brazil | pt-BR |
| 🇧🇬 | Bulgaria | bg-BG |
| 🇨🇦 | Canada | en-CA, fr-CA |
| 🇨🇴 | Colombia | es-CO |
| 🇨🇿 | Czech Republic | cs-CZ |
| 🇩🇰 | Denmark | da-DK |
| 🇪🇬 | Egypt | en-EG, ar-EG |
| 🇫🇮 | Finland | fi-FI |
| 🇫🇷 | France | fr-FR |
| 🇩🇪 | Germany | de-DE |
| 🇬🇷 | Greece | el-GR |
| 🇭🇺 | Hungary | hu-HU |
| 🇮🇳 | India | hi-IN, en-IN |
| 🇮🇹 | Italy | it-IT |
| 🇯🇵 | Japan | ja-JP |
| 🇲🇽 | Mexico | es-MX |
| 🇲🇦 | Morocco | ar-MA, fr-MA |
| 🇳🇱 | Netherlands | nl-NL |
| 🇳🇴 | Norway | no-NO |
| 🇵🇱 | Poland | pl-PL |
| 🇵🇹 | Portugal | pt-PT |
| 🇷🇴 | Romania | ro-RO |
| 🇷🇺 | Russia | ru-RU |
| 🇸🇦 | Saudi Arabia | en-SA, ar-SA |
| 🇸🇰 | Slovakia | sk-SK |
| 🇿🇦 | South Africa | en-ZA |
| 🇰🇷 | South Korea | ko-KR |
| 🇪🇸 | Spain | es-ES |
| 🇸🇪 | Sweden | sv-SE |
| 🇨🇭 | Switzerland | fr-CH, de-CH, it-CH |
| 🇹🇭 | Thailand | th-TH, en-TH |
| 🇹🇳 | Tunisia | ar-TN, fr-TN |
| 🇹🇷 | Turkey | tr-TR |
| 🇺🇦 | Ukraine | uk-UA |
| 🇦🇪 | United Arab Emirates | ar-AE, en-AE |
| 🇬🇧 | United Kingdom | en-GB |
| 🇺🇸 | United States | en-US |