Skip to content

Languages & currency

25 languages with browser-language detection, lazy-loaded catalogs, and locale-aware amount formatting — one currency per session.

The elements speak the 24 official EU languages plus Catalan, detect the customer’s language by themselves, and format every amount to the customer’s conventions. You configure nothing to get all of it; this page explains what happens and where the knobs are.

One attribute decides, with a safe chain behind it:

  1. locale on <payplug-session> — set it when your page knows its language: <payplug-session locale="de">. Reactive: changing it re-renders every text in place.
  2. The browser’s language (navigator.language) when the attribute is absent — the right default for a checkout: the customer reads their own language even on a shop they don’t share one with.
  3. English as the last resort.

A regional locale reads its base language’s catalog — fr-BE renders the fr texts — but keeps its full form for formatting, so a Belgian customer sees French words with Belgian number conventions.

bg ca cs da de el en es et fi fr ga hr hu it lt lv mt nl pl pt ro sk sl sv

Unsupported languages fall back to English. Each catalog is its own lazy-loaded file: a customer downloads exactly one (7–11 kB), never the other 24 — switching language fetches exactly one more.

Amounts: one currency, minor units, native formatting

Section titled “Amounts: one currency, minor units, native formatting”
  • One currency per session, set at creation (currency: "EUR"); every amount is an integer in the currency’s minor unit (100000 = €1,000.00). No conversions, no floats, no rounding drift.
  • Display uses native Intl with the currency’s own fraction digits: EUR shows two decimals, JPY shows none — and the same amount reads €1,000.00 under en, 1 000,00 € under fr. Symbol, order and separators all follow the locale.

Nothing up front: the main bundle embeds no catalog and no CLDR data. The one catalog the session resolves is fetched when the first component renders, from the same origin as the bundle.