Skip to main content

Language

The SDK supports 17 languages with automatic device locale detection.

Supported languages

CodeLanguage
enEnglish
ruРусский
deDeutsch
frFrançais
esEspañol
itItaliano
ptPortuguês
plPolski
trTürkçe
arالعربية
zh中文
ja日本語
ko한국어
hiहिन्दी
idIndonesia
msMelayu
filFilipino

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

  1. authScreen(locale:) — highest priority
  2. SsoConfig(locale:) — global default
  3. Device locale — auto-detected
  4. 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.