Localization
The Paysight Widget supports multiple languages and regions through its comprehensive localization system. This guide explains how to configure and use these features to create a localized payment experience for your global customers.
Supported Locales
English (US)
en-US
English (UK)
en-GB
German
de-DE
Spanish
es-ES
French
fr-FR
Italian
it-IT
Polish
pl-PL
Portuguese
pt-PT
Romanian
ro-RO
Russian
ru-RU
Turkish
tr-TR
Finnish
fi-FI
Norwegian
no-NO
Setting the Locale
You can set the locale when initializing the widget:
If no locale is specified, the widget defaults to
en-US
.Localization Effects
UI Text
UI Text
All text elements in the widget interface are automatically translated based on the selected locale, including:
When the locale is changed, all UI elements adapt automatically, including field labels, placeholder text, error messages, and button text. For example, in French, “Card Number” becomes “Numéro de Carte” and “Pay Now” becomes “Payer Maintenant”.
- Field labels and placeholders
- Error and validation messages
- Button text
- Section headers
- Helper text
Date Formats
Date Formats
Date formats are automatically adjusted based on the locale:
Locale | Date Format | Example |
---|---|---|
en-US | MM/YY | 12/25 |
en-GB | MM/YY | 12/25 |
de-DE | MM/JJ | 12/25 |
fr-FR | MM/AA | 12/25 |
Expiration date input is automatically formatted according to the locale’s conventions.
Number Formats
Number Formats
Currency and number formats follow locale-specific conventions:
Locale | Currency Format | Example |
---|---|---|
en-US | $X,XXX.XX | $1,234.56 |
en-GB | £X,XXX.XX | £1,234.56 |
de-DE | X.XXX,XX € | 1.234,56 € |
fr-FR | X XXX,XX € | 1 234,56 € |
The widget automatically formats currency displays based on the locale and currency settings.
Validation Messages
Validation Messages
Validation error messages are translated to match the selected locale:
All validation messages are professionally translated to maintain consistency and clarity.
Custom Button Text
The
buttonText
property overrides the default localized button text, allowing you to customize the call-to-action regardless of the selected locale.Localization Best Practices
1
Default to Browser Locale
Consider detecting the user’s browser locale and setting the widget locale accordingly:
2
Provide Language Selection
Give users the ability to choose their preferred language:
A well-designed language selector typically appears as a dropdown menu with language names in their native script, often accompanied by country/region flags. When users select a language, the widget interface updates immediately to reflect the new locale.
3
Test with RTL Languages
If you plan to support right-to-left languages in the future, test your integration with RTL layout.
While the widget doesn’t currently support RTL languages like Arabic or Hebrew, proper container styling can help prepare for future support.
4
Ensure Consistent Experience
Make sure the rest of your application is localized to match the widget locale for a consistent user experience.
A consistent localized experience across your entire checkout flow improves user trust and conversion rates.
Complete Implementation Example
Dynamic Locale Selection Implementation
Dynamic Locale Selection Implementation