Localization
There are two different parameters to set the localization of the Rubens Configurator. First there is locale
and then there is overrideCountry
.
If they are not provided, both of them are inferred by the Rubens Configurator based on the browser settings and the location of the user of your webshop. Most of the time this is not 100% accurate. Let's have a look why on the example of locale
.
To set the language for the configurator we use locale
. If a user visits your German webshop but has the browser settings switched to Spanish the configurator would be in Spanish but your webshop is in German. Since the Rubens Configurator does not know that it is embedded on the German webshop it's the best guess we can make. But if the webshop sets the locale
we can use the same language as in the webshop.
Therefore we highly recommend using this parameter. The same challenge arises for overrideCountry
. The country parameter is used for the Rubens Price service. Based on the country we decide which price list to load. For example the price list with pounds for the UK webshop and the euro prices for the webshop based in EU.
For both parameters we use two digits codes. For locale we use the ISO_639-1 and for country ISO_3166-1_alpha-2, you can find the list for languages for example on ISO_639-1. The same is true for the country codes ISO_3166-1_alpha-2.
Let's have a look on the following code:
With this snippet the webshop tells the Rubens Configurator that it should use the language de
and the country at
. Which basically means: "show the configurator in German and with the prices for the Austrian market". As explained above the overrideCountry
is only needed if your webshop does not maintain the prices and you rely on the Rubens Price Service.
To check whether your language is supported, take a look at the currently supported configurator languages.
Last updated