Flutter
š Flutter Internationalization for Ditto ID SDK
This document explains how to implement internationalization support in Flutter apps using the Ditto ID SDK (Section 11.3.2). It enables the SDK to adapt dynamically to the app's language setting at runtime.
š§¾ Overview
If your application supports language selection within the app, you must notify the Ditto ID SDK whenever the language changes. This ensures all SDK components (UI prompts, messages) switch to the selected language.
š ļø Flutter Code Snippet
Add the following function in your Flutter app to set the SDK language dynamically:
function setAppLanguage(locale, localeDirection) {
// Example values: "es" for Spanish, "fr" for French
rdna.setIDVSelfieConfirmation(locale, localeDirection);
}š§Ŗ Usage
Invoke setAppLanguage(locale) whenever the user changes the language preference in your app settings.
// Example: set to French
setAppLanguage("fr", 0);š Notes
- The
localeparameter should follow standard language codes (e.g., "en", "fr", "ja"). - This change immediately affects all SDK modules integrated in the app.
By implementing this, the Ditto ID SDK will respect your appās selected language, ensuring a cohesive and localized user experience throughout the workflow.
Updated about 1 month ago
