Localization of built-in user interface of Mobile Capture

Since last year Mobile Capture product provides developers with the ability to add user interface for image capture use-case into any iOS or Android app by adding just several lines of code. As for now, this is the fastest and most convenient way to start using our product for image capturing purposes.

How to integrate Image Capture UI:
- iOS
- Android

This UI comes with a variety of customizations, such as:
- Turning off/on buttons
- Configuring scenario: what documents we need to capture, how many, tips for end-users

For more information please read the documentation

How can we localize the UI?
Today we have the only English version of texts, buttons, etc in our built-in UI, but every client can customize with simple and easy steps.

Android
For Android you can adjust localizations of the user interface by editing the CaptureView in XML layout, please look into "Attributes" section of this article.

It will be more convenient to use @string syntax instead of exact values to be able to provide several localizations for end-users. We made resources ids self-explanatory so I hope you will be able to navigate through them.

iOS
iOS is a little bit trickier for localization, here we have several localization blocks:
- AbbyyUI.strings - Camera UI
- AbbyyUI.stringsdict - Camera UI (plurals)
- AbbyyPagesEditor.strings - Image Editor and Preview screen
- AbbyyCrop.strings - Manual Crop screen

You will need to create files (one per each block, with the same name as above) in Sources folder and redefine required resources (no need to add an element if you don't want to redefine it)

After that you should specify that you have replacement for localized strings:

- swift syntax (AppDelegate.swift): AUICaptureController.localizedStringsBundle = Bundle.main
- objc syntax: AUICaptureController.localizedStringsBundle = NSBundle.mainBundle


Here is a list of iOS resources to localize:

Image Editor and Preview screen (AbbyyPagesEditor.strings)

"MPICSEditorAddPageButton" = "Add page";
"MPICSEditorNextDocumentButton" = "Continue";
"MPICSEditorDoneButton" = "Save";
"MPICSEditorCurrentDocumentIndex" = "%ld of %ld";
"MPICSEditorDeleteAllWarningTitle" = "Are you sure?";
"MPICSEditorDeletePageWarningTitle" = "Page will be deleted.";
"MPICSEditorDeleteAllWarningMessage" = "All captured pages will be deleted.";
"MPICSEditorDeletePageWarningCancelButton" = "Cancel";
"MPICSEditorDeletePageWarningConfirmButton" = "Delete Page";
"MPICSEditorDeleteAllWarningCancelButton" = "Cancel";
"MPICSEditorDeleteAllWarningConfirmButton" = "Confirm";
"MPICSEditorErrorTitle" = "Error occured";
"MPICSEditorErrorButton" = "Ok";

Manual Crop Screen (AbbyyCrop.strings)

"MPICSCropCancelButton" = "Cancel";
"MPICSCropAcceptButton" = "Accept";
"MPICSCropAutocropButton" = "Autocrop";
"MPICSCropOriginalButton" = "Original";
"MPICSCropTitle" = "Crop";

Camera UI (AbbyyUI.strings)

"ICSLookingForDocumentTip" = "Looking for document";
"ICSMoveCloserTip" = "Closer";
"ICSDontMoveTip" = "Keep still";
"CameraEnableCameraAccessInSystemSettings" = "Turn on camera permissions in system settings";
"CameraEnableGalleryAccessInSystemSettings" = "Turn on gallery permissions in system settings";
"CameraOpenPreferences" = "Open preferences";
"CameraAccessDenied" = "Access Denied";
"CameraAlertButtonCancel" = "Cancel";
// RTF option for attributed button title. Unicode characters transformation into \\uXXXX is not required.
"CameraEnableCameraAccessInSystemSettingsRTF" = "{\\rtf1 {\\colortbl;\\red255\\green255\\blue255;}\\cf1 Turn on camera permissions \\line in system \\ul Settings \\ulnone}";
"CameraMetalNotSupported" = "This device is unsupported";
"MPICSCameraNumberOfCapturedPagesFixedCount" = "%ld of %ld";

Camera UI plurals (AbbyyUI.stringsdict)

MPICSCameraNumberOfCapturedPages (Button that leads to Image Editor and Preview screen)

Was this article helpful?

0 out of 0 found this helpful

Have more questions? Submit a request

Recently viewed