If you are using our Localization feature, and have added at least one other language than English to the Localization dashboard under Manage → Localization, you'll be able to translate and localize the copy of your System, Offer, My Account, Email Notification, and Identity Management templates. After this is done, the user will see the Piano templates localized, given that their browser's locale is one of the languages added in your Localization dashboard. For example, if you've added German as a Localization language and selected it as your default language, users that have their browser's locale or language set to Germany, respectively German, will be shown a localized German copy of your templates.
If your website is targetting users from multiple regions with different languages, the user can select the language of their choice through the language selector.
This selector can be added to templates with the below code:
<language-selector></language-selector>
We save the LANG cookie and set the user's default language, and based on that we show the templates localized into this language as well as send any notification emails in that language.
More information about the LANG cookie is available here.
If you'd like to set the user's language programmatically, you can do so by using the following function in your loading script:
tp.push(["setLocale","<language_locale>"])
For example, if you'd like to set your customer's template language to French, you can use the following snippet:
tp.push(["setLocale","fr_FR"])
The currently supported locales are listed here.