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 Spanish

Cordova

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

ParameterTypeDescription
localeCodeStringThe language locale code for the SDK
localeDirectionRDNALanguageDirection (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.