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 locale parameter 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.