Language
The SDK supports 17 languages with automatic device locale detection.
Supported languages
| Code | Language |
|---|---|
en | English |
ru | Русский |
de | Deutsch |
fr | Français |
es | Español |
it | Italiano |
pt | Português |
pl | Polski |
tr | Türkçe |
ar | العربية |
zh | 中文 |
ja | 日本語 |
ko | 한국어 |
hi | हिन्दी |
id | Indonesia |
ms | Melayu |
fil | Filipino |
Auto-detection (default)
By default, the SDK uses the device locale. If the device locale is not in the supported list, it falls back to English.
Set language at init (global)
Force a specific language for all SDK screens:
await SsoSdk.initialize(SsoConfig(
baseUrl: '...',
origin: SsoOrigin.heroDev,
appName: 'MyApp',
locale: const Locale('ru'),
));
Set language per screen
Override the language for a specific auth screen:
SsoSdk.authScreen(
enabledProviders: [...],
locale: 'fr', // French for this screen only
);
Priority
authScreen(locale:)— highest prioritySsoConfig(locale:)— global default- Device locale — auto-detected
- English — fallback
String overrides
Override any SDK string without changing the language:
await SsoSdk.initialize(SsoConfig(
baseUrl: '...',
origin: SsoOrigin.heroDev,
appName: 'MyApp',
textOverrides: {
'login_title': 'Welcome back!',
'oauth_welcome_title': 'Sign in to {appName}',
},
));
String keys are defined in SsoStringKeys. Overrides apply to all languages.