Localization
Learn how to localize the Paysight Widget for different languages and regions
Localization
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
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
Locale Code | Language | Region |
---|---|---|
en-US | English | United States |
en-GB | English | United Kingdom |
de-DE | German | Germany |
es-ES | Spanish | Spain |
fr-FR | French | France |
it-IT | Italian | Italy |
pl-PL | Polish | Poland |
pt-PT | Portuguese | Portugal |
ro-RO | Romanian | Romania |
ru-RU | Russian | Russia |
tr-TR | Turkish | Turkey |
fi-FI | Finnish | Finland |
no-NO | Norwegian | Norway |
Setting the Locale
You can set the locale when initializing the widget:
You can set the locale when initializing the widget:
You can update the locale after the widget has been initialized:
Localization Effects
UI Text
UI Text
All text elements in the widget interface are automatically translated based on the selected locale, including:
- 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 |
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 € |
Validation Messages
Validation Messages
Validation error messages are translated to match the selected locale:
Custom Button Text
Localization Best Practices
Default to Browser Locale
Consider detecting the user’s browser locale and setting the widget locale accordingly:
Provide Language Selection
Give users the ability to choose their preferred language:
Test with RTL Languages
If you plan to support right-to-left languages in the future, test your integration with RTL layout.
Ensure Consistent Experience
Make sure the rest of your application is localized to match the widget locale for a consistent user experience.
Complete Implementation Example
Dynamic Locale Selection Implementation
Dynamic Locale Selection Implementation