Flutter
📱 Flutter iOS Localization Setup for Ditto ID SDK
This document describes how to configure localization in a Flutter project (iOS platform) when integrating the Ditto ID SDK.
🏷️ Overview
Ditto ID Flutter plugins support localization for custom languages. By default, English is supported out-of-the-box via .strings files. Developers can add new languages and override SDK text by integrating localized string files provided by Ditto.
📂 String Files by Module
| Plugin Module | File Name |
|---|---|
| Ditto ID | RELID.strings |
| Ditto MTD | MTD.strings |
| IDV Core | IDVCore.strings |
| Document Capture Plugin | IDVDocumentCapture.strings |
| Selfie Capture Plugin | IDVSelfieCapture.strings |
🔧 Integration Steps (iOS - Xcode)
Step 1: Get the .strings Files
.strings FilesRequest default .strings files from Ditto for all modules you're integrating.
Step 2: Drag and Drop
Drag the string files (e.g., IDVCore.strings) into your Xcode project.
Step 3: Localize the File
- Select the added
.stringsfile in the project navigator. - Open the Identity Inspector.
- Click Localize to enable localization for the file.
Step 4: Add a New Language
- Go to Project > Info > Localizations.
- Enable Base Internationalization if not already.
- Click + to add a new language (e.g.,
French).
Step 5: Generate Localized Files
- Select the
.stringsfile again. - Choose the newly added language to generate a localized version (e.g.,
IDVCore.strings (French)).
Step 6: Translate and Customize
Override default English keys with the translated text in the new .strings file.
"SCAN_DOCUMENT_PROMPT" = "Veuillez scanner le document";
"CAPTURE_SELFIE_PROMPT" = "Veuillez capturer un selfie";🔁 Repeat for Other Modules
Repeat steps 1–6 for:
IDVDocumentCapture.stringsIDVSelfieCapture.strings
This setup ensures a fully localized experience across all Ditto ID SDK components in your Flutter iOS app.
🤖 Flutter Android Localization Setup for Ditto ID SDK
This guide outlines how to configure localization for the Ditto ID SDK in your Flutter app (Android platform).
🏷️ Overview
Ditto ID SDK supports multilingual translations through XML string resources. Developers can localize the SDK experience by adding or modifying string resources provided by Ditto for different modules.
📋 Prerequisites
Ensure you have the following files shared by the Ditto ID admin:
strings_rel_id.xml— For Ditto ID wrapper and core messagesstrings_mtd.xml— For Ditto ID MTD messagesstrings-idv.xml— For Ditto ID Core messagesstrings-idv-doc-scan.xml— For document scanner modulestrings-idv-face-scan.xml— For selfie capture module
🛠️ Integration Steps
1. Open Android Studio
Open your Flutter Android project using Android Studio.
2. Create Resource Directory
- Navigate to
resfolder → right-click →New→Android Resource Directory. - Set Resource type to
values. - Set Locale to your target language/region (e.g.,
ru-RUfor Russian).
3. Add Localization Files
Copy the provided XML files into the newly created locale folder:
values-ru-rRU/strings_rel_id.xmlvalues-ru-rRU/strings_mtd.xmlvalues-ru-rRU/strings-idv.xmlvalues-ru-rRU/strings-idv-doc-scan.xmlvalues-ru-rRU/strings-idv-face-scan.xml
4. Translate the Values
Edit the XML files and override the string values with the appropriate translation:
<string name="scan_document_prompt">Пожалуйста, отсканируйте документ</string>
<string name="capture_selfie_prompt">Пожалуйста, сделайте селфи</string>Repeat this for all supported strings.
📌 Notes
- If needed, you may merge these string files into your app’s
strings.xmlbut retain all Ditto ID key names. - Repeat the above process for each target locale by creating new
values-<locale>directories.
By following this guide, your Flutter Android application will deliver a seamless localized user experience for all Ditto ID IDV SDK components.
