Language and Localization
HelcimPay.js supports English and French, letting you offer a localized checkout experience and meet French-language requirements like Quebec's Bill 96.
HelcimPay.js can render the payment modal in English or French. This lets you offer a localized checkout experience to your customers, and helps you meet French-language display requirements such as Quebec's Bill 96 (Charter of the French Language), which requires customer-facing payment pages to display fields and labels in French by default for Quebec customers.
How the modal language is determined
HelcimPay.js resolves the modal's language using the following priority order:
- The
languageparameter on your HelcimPay.js initialize request, if set toenorfr. - The customer's browser language preference for English or French, detected automatically.
- English, used as the default if neither of the above apply.
| Parameter | Type | Description |
|---|---|---|
language | string | Optional. Overrides automatic language detection for the checkout session. Accepts en or fr. Any other value is ignored and falls back to browser detection or English default according to above priority order. |
// Example HelcimPay.js Initialize Request with a language override
const options = {
method: 'POST',
headers: {
accept: 'application/json',
'api-token': 'your-api-token',
'content-type': 'application/json'
},
body: JSON.stringify({
paymentType: 'purchase',
amount: 100,
currency: 'CAD',
language: 'fr'
})
};
fetch('https://api.helcim.com/v2/helcim-pay/initialize', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
Automatic language detectionIf you don't pass a
languageparameter, HelcimPay.js checks the customer's browser language settings and matches on the base language (for example,fr-CAandfr-FRboth matchfr).Browsers report this differently — some expose a full ordered list of preferences, others expose only a single value derived from the operating system — so browser detection is a best-effort signal, not a guarantee. If you need to guarantee a language for a specific customer or region (for example, a Quebec-only checkout flow), pass the language
parameterexplicitly rather than relying on browser detection alone.
Supported languages
HelcimPay.js supports rendering in either English or French. Support for additional languages may be added in the future.
| Code | Language |
|---|---|
en | English |
fr | French |
Letting customers switch languages in HelcimPay.js
The HelcimPay.js modal includes a language toggle so customers can switch between English and French at any point during checkout, regardless of how the initial language was determined.
- Switching languages re-renders the modal's text immediately, without reloading the page or losing any information the customer has already entered.
- The selected language applies only for that checkout session — it isn't saved or remembered between sessions. Each new checkout re-runs the resolution order described above.
- Switching languages does not emit an iFrame event and has no effect on the transaction response.
Updated about 1 hour ago