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.
Updated 2 months ago
