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 ModuleFile Name
Ditto IDRELID.strings
Ditto MTDMTD.strings
IDV CoreIDVCore.strings
Document Capture PluginIDVDocumentCapture.strings
Selfie Capture PluginIDVSelfieCapture.strings

šŸ”§ Integration Steps (iOS - Xcode)

Step 1: Get the .strings Files

Request 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 .strings file 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 .strings file 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.strings
  • IDVSelfieCapture.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 messages
  • strings_mtd.xml — For Ditto ID MTD messages
  • strings-idv.xml — For Ditto ID Core messages
  • strings-idv-doc-scan.xml — For document scanner module
  • strings-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 res folder → right-click → New → Android Resource Directory.
  • Set Resource type to values.
  • Set Locale to your target language/region (e.g., ru-RU for Russian).

3. Add Localization Files

Copy the provided XML files into the newly created locale folder:

  • values-ru-rRU/strings_rel_id.xml
  • values-ru-rRU/strings_mtd.xml
  • values-ru-rRU/strings-idv.xml
  • values-ru-rRU/strings-idv-doc-scan.xml
  • values-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.xml but 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.