Localization
Language support and RTL layout
Setting the Locale
Pass a locale code to init():
VisaAcceptance.init({
locale: 'fr-FR', // French (France)
});Supported Locales
| Code | Language | Direction |
|---|---|---|
en-US | English (US) | LTR |
en-GB | English (UK) | LTR |
fr-FR | French | LTR |
de-DE | German | LTR |
es-ES | Spanish | LTR |
pt-BR | Portuguese (Brazil) | LTR |
ar-SA | Arabic | RTL |
he-IL | Hebrew | RTL |
ja-JP | Japanese | LTR |
zh-CN | Chinese (Simplified) | LTR |
RTL Support
Components automatically switch to right-to-left layout when an RTL locale is detected. No additional configuration needed.
Runtime Locale Switching
Update the locale after initialization:
// Update all mounted components to a new locale
VisaAcceptance.updateConfig({ locale: 'ar-SA' });Components will re-render with the new locale and layout direction.
Number and Currency Formatting
All numbers and currencies are formatted according to the active locale using Intl.NumberFormat. You do not need to handle formatting — the components do it automatically.