Skip to content

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 ​

CountryLocales
🇩🇿Algeriaar-DZ, fr-DZ
🇦🇷Argentinaes-AR
🇦🇺Australiaen-AU
🇦🇹Austriade-AT
🇧🇪Belgiumfr-BE, nl-BE
🇧🇷Brazilpt-BR
🇧🇬Bulgariabg-BG
🇨🇦Canadaen-CA, fr-CA
🇨🇴Colombiaes-CO
🇨🇿Czech Republiccs-CZ
🇩🇰Denmarkda-DK
🇪🇬Egypten-EG, ar-EG
🇫🇮Finlandfi-FI
🇫🇷Francefr-FR
🇩🇪Germanyde-DE
🇬🇷Greeceel-GR
🇭🇺Hungaryhu-HU
🇮🇳Indiahi-IN, en-IN
🇮🇹Italyit-IT
🇯🇵Japanja-JP
🇲🇽Mexicoes-MX
🇲🇦Moroccoar-MA, fr-MA
🇳🇱Netherlandsnl-NL
🇳🇴Norwayno-NO
🇵🇱Polandpl-PL
🇵🇹Portugalpt-PT
🇷🇴Romaniaro-RO
🇷🇺Russiaru-RU
🇸🇦Saudi Arabiaen-SA, ar-SA
🇸🇰Slovakiask-SK
🇿🇦South Africaen-ZA
🇰🇷South Koreako-KR
🇪🇸Spaines-ES
🇸🇪Swedensv-SE
🇨🇭Switzerlandfr-CH, de-CH, it-CH
🇹🇭Thailandth-TH, en-TH
🇹🇳Tunisiaar-TN, fr-TN
🇹🇷Turkeytr-TR
🇺🇦Ukraineuk-UA
🇦🇪United Arab Emiratesar-AE, en-AE
🇬🇧United Kingdomen-GB
🇺🇸United Statesen-US