Text Customization
The strings the Smart Capture flow renders — instructions, buttons, error messages and accessibility labels — can be replaced with your own wording, without forking the SDK.
Overview
Every text shown in the Smart Capture flow is a normal Android string resource with a fixed resource ID. You ship your own wording by declaring a string with the same name in the React Native Android app module. You only include the keys you actually want to change; everything else keeps the SDK’s own translation.
This works because of how Android merges resources: when your app and the Smart Capture library both declare a string with the same name, your app’s resource wins at build time. No runtime API — customLocalization on the TypeScript config does nothing on Android.
Resource IDs are internal to the current native SDK version and may change between releases. Re-check this list after upgrading.
API
Android does not use a TypeScript field for strings. Customization is the resource name:
String resource override
android/app/src/main/res/values/strings.xml (or values-<locale>/)
Declare a <string> (or <plurals>) with the same name as the SDK.
When you don’t declare a given name, the SDK uses its own string.
<!-- android/app/src/main/res/values/strings.xml -->
<resources>
<string name="certta_smart_capture_instructions_title">Get your ID ready</string>
<string name="certta_smart_capture_select_validation_type_capture_title">Open camera</string>
</resources>Everything else on those screens keeps the SDK’s own wording.
Adding your strings
Create or reuse
strings.xmlin the Android app module —android/app/src/main/res/values/and, for each locale,values-<locale>/.Add only the keys you want to override. Omitted keys are not an error and do not render a raw key on screen.
Rebuild the app. Your resources replace the SDK defaults automatically.
Resolution order
For each key, Android resolves in this order:
Your app’s string with that resource ID, in the locale folder that matches the device language.
Your app’s string with that ID in the default
values/folder (if you overrode it there).The SDK’s own table for the device language.
The SDK default, which is English.
Partial overrides are supported and recommended. Declaring a name that the SDK doesn’t use is ignored.
The SDK ships English, Spanish and Portuguese. On a device whose language is none of these, the SDK’s text is shown in English.
Localization
The language shown follows the device locale against the resource folders your app packages. Smart Capture does not expose a language switch of its own.
English (default/fallback)
values/
Spanish
values-es/
Portuguese
values-pt/
Adding a language the SDK does not ship
Create values-<locale>/strings.xml in the Android app module and override the keys the user will see. Keys you omit fall back to English, so translate every key that should appear in that language.
Format specifiers
certta_smart_capture_camera_wrong_document_back_expected_hint. Your replacement must keep the same placeholders and structure. Dropping them, or changing plural <item> quantities, produces wrong output at runtime.
Key reference
All keys are prefixed certta_smart_capture_ to avoid collisions. Values shown are the English defaults.
Capture instructions
Invalid document messages
Document type names
Document accessibility labels
Capture preview
Instructions carousel — shared
Instructions carousel — capture mode
Instructions carousel — upload mode
Validation method selection
Camera help sheet
Permission denied screen
Upload review screen
Upload — delete file sheet
Upload — validation alerts
Success screen
Shared / generic
Overview
The strings the Smart Capture flow renders — instructions, buttons, error messages and most VoiceOver labels — can be replaced with your own wording, without forking the SDK.
You ship a .strings table in the iOS app target and tell the SDK its name via TypeScript. You only include the keys you actually want to change; everything else keeps the SDK’s own translation.
Two pieces of text are outside this table: the document type abbreviations (RG, CNH, RNE, CTPS, CRLV) and the camera-denied screen, which is shared with other CAF products. Neither can be changed through customLocalization.
API
React Native exposes one optional field on CerttaSmartCaptureConfiguration:
customLocalization
string
null
Name of your .strings table — the filename without the extension. Loaded from the main app bundle (Bundle.main).
When customLocalization is omitted, the SDK uses its own strings.
Adding your strings table
Create a
.stringsfile in the iOS app target — for exampleMySmartCapture.strings— and place it under the<language>.lproj/directory of each locale you support (ios/<App>/en.lproj/,ios/<App>/pt-BR.lproj/, …).Add only the keys you want to override. Omitted keys are not an error and do not render a raw key on screen.
Pass the filename without the extension as
customLocalization.
Everything else on the instructions screen keeps the SDK’s own wording.
Resolution order
For each key, the SDK resolves in this order:
Your
customLocalizationtable in the main app bundle.The SDK’s own table for the device language.
The default value compiled into the SDK, which is Brazilian Portuguese.
Partial tables are supported and recommended. Passing a table name that does not exist is also safe — every key falls back to the SDK’s own text.
The SDK ships English, Spanish and Brazilian Portuguese. On a device whose preferred languages include none of these, the SDK’s text is shown in Brazilian Portuguese.
Localization
The SDK resolves strings through the standard iOS lookup, so the language shown follows the user’s preferred languages as negotiated against the localizations your app declares — Smart Capture does not expose a language switch of its own.
Your custom table is resolved per locale in exactly the same way: a key is read from the <language>.lproj/ directory matching the resolved language, falling back to your table’s development region, then to the SDK’s own text.
Adding a language the SDK does not ship
Create the .lproj directory for that language in the iOS app, add your table there, and make sure the language is listed in the app’s localizations. Keys you omit fall back to Brazilian Portuguese, so translate every key the user will see.
Replacing a language the SDK does ship
There is no way to remove a bundled translation. To change a shipped language’s wording, override the keys for that locale in your own table.
Format specifiers
Some values contain format specifiers such as %@, %d, or %1$d. Your replacement must keep the same specifiers. Dropping them, or reordering them without positional syntax, produces wrong output.
.stringsdict plural rules are not consulted. Plural variations must be handled by the keys listed below.
Upload file type messages
smart_capture.upload.file_invalid_extension.message
allowedUploadTypes is unset, empty, or lists all five formats.
smart_capture.upload.file_invalid_extension.message_format
allowedUploadTypes narrows the set; %@ receives the extension list.
smart_capture.list.or
Disjunctive connective used to join the list (and document type lists).
Key reference
All keys are prefixed smart_capture. to avoid collisions. Values shown are the English defaults.
A ready-to-copy .strings file is published alongside the native SDK: SmartCapture/SmartCaptureLocalizable.strings. Start from it, then delete the keys you do not intend to override.
Capture instructions
Invalid document messages
Document type names
The other document types are shown by their Brazilian abbreviations — RG, CNH, RNE, CTPS and CRLV — which are not customizable. Their VoiceOver names are under Accessibility — document names.
Capture preview
Instructions carousel — shared
Instructions carousel — capture mode
Instructions carousel — upload mode
Validation method selection
Upload source selection
Camera help sheet
Upload review screen
Upload — delete file sheet
Upload — validation alerts
Upload — send failure
Accessibility — capture and preview
Accessibility — instructions and validation method
Accessibility — upload
Accessibility — document names
Atualizado

