Internationalization
š Internationalization
Internationalization (i18n) allows the app to dynamically adapt to different languages at runtime based on user preferences. This API is used to set the SDK language and text direction at runtime. It allows the application to change the language localization and text direction (LTR, RTL, or vertical) of the RDNA SDK UI components after initialization.
š² Setting Language Programmatically
React Native
RdnaClient.setSDKLanguage(localeCode: string, localeDirection: RDNALanguageDirection, reactCallBack:
RCTResponseSenderBlock)Flutter
RdnaClient.setSDKLocale("es"); // For SpanishCordova
com.uniken.rdnaplugin.RdnaClient.setSDKLocale(success, failure, ["ja"]);iOS (Swift)
(NSString *)setSDKLanguage:(NSString *)localeCode localeDirection:(RDNALanguageDirection)localeDirection;Android (Java)
fun setSDKLanguage(localeCode: String, languageDirection: Int, callback: Callback)Parameters
| Parameter | Type | Description |
|---|---|---|
| localeCode | String | The language locale code for the SDK |
| localeDirection | RDNALanguageDirection (enum) | Text direction for the locale |
Language Direction enum
export const enum RDNALanguageDirection {
RDNA_LOCALE_LTR = 0, // Left-to-Right (English, Spanish, French, etc.)
RDNA_LOCALE_RTL = 1, // Right-to-Left (Arabic, Hebrew, Urdu, etc.)
RDNA_LOCALE_TBRL = 2, // Top-Bottom-Right-Left (Traditional Chinese, Japanese vertical)
RDNA_LOCALE_TBLR = 3, // Top-Bottom-Left-Right (Mongolian vertical)
RDNA_LOCALE_UNSUPPORTED = 4 // Unsupported language direction
}š Effect
Once set, all subsequent SDK components (UI prompts, validation messages, etc.) reflect the selected locale, enabling a consistent multilingual experience.
Updated 2 months ago
