Language
Prices and the checkout's texts are in ?lang= (URL parameters), else nextConfig.locale, else the campaign's language. nextConfig.translations replaces any text by its key. Set both before the loader script.
CODE
<script>
window.nextConfig = {
locale: 'fr-FR',
translations: {
fr: { 'fields.postcode.errors.blank': 'Il nous faut votre code postal' },
},
};
</script>A text comes from the page's translations (fr-FR, then fr), then the address service, then English. Every key, its default in each language and how to override it: Languages.
| Text | Key |
|---|---|
| A field's message | fields.<field>.errors.<error> |
| City, state and postcode | fields.<field>.label; other labels the page writes with data-next-i18n |
| Card fields | payment.card.* |
| A declined payment | payment.errors.<code>, else payment.errors.generic (Payment errors) |