Localization
The SDK localizes all text inside the card form iframe — labels, placeholders, CTA buttons, installment picker, processing messages, and decline banners.
Set the locale
Section titled “Set the locale”Pass a locale code when you initialize the SDK:
import { ZatlasCardCapture } from '@zatlas/card-capture';
const zatlas = new ZatlasCardCapture({ publishableKey: 'pk_sandbox_your_key', locale: 'es-MX',});Supported locales
Section titled “Supported locales”| Locale | Language | CTA (checkout) | CTA (tokenize) |
|---|---|---|---|
es-MX | Spanish (Mexico) — default | Continuar | Guardar metodo |
es-ES | Spanish (Spain) | Continuar | Guardar metodo |
en-US | English (US) | Continue | Save method |
en-GB | English (UK) | Continue | Save method |
pt-BR | Portuguese (Brazil) | Continuar | Salvar metodo |
es-ES uses the same strings as es-MX. en-GB uses the same strings as en-US.
What gets localized
Section titled “What gets localized”Everything the guest sees inside the card form is localized:
- Field labels — Card number, Expiration, CVV, Cardholder name, Email
- Placeholders —
1234 5678 9012 3456,MM / YY,CVC,Como aparece en la tarjeta,correo@ejemplo.com - Validation errors — “Numero de tarjeta requerido” / “Card number required”, “Fecha requerida” / “Expiration required”, etc.
- CTA buttons — “Continuar” / “Continue”, “Guardar metodo” / “Save method”, “Confirmar pago” / “Confirm payment”
- Installment picker — Payment method selector, installment counts (“{count} meses” / “{count} months”), monthly payment, total, financing cost labels
- Processing messages — “Estamos procesando tu pago” / “We are processing your payment”, “Verificando tu identidad” / “Verifying your identity”
- Decline banners — Error messages for card_declined, insufficient_funds, expired_card, incorrect_cvc, network_error, timeout, and other decline codes
Fallback behavior
Section titled “Fallback behavior”If you pass an unsupported locale code (or omit the locale option entirely), the SDK defaults to es-MX.
// All of these use es-MX strings:new ZatlasCardCapture({ publishableKey: 'pk_sandbox_...' }); // no localenew ZatlasCardCapture({ publishableKey: 'pk_sandbox_...', locale: 'fr-FR' }); // unsupported