Providing multi-language verbiage overrides
Each customer flow documented above includes an optional verbiage
prop, bearing the type signature { [key: string]: CustomerSuppliedVerbiage }
. The CustomerSuppliedVerbiage
can be a string
(which overrides all locales), or a { [key: string]: string }
containing verbiage overrides in multiple i18n locales.
The level of specificity in locale codes can be controlled by supplying or omitting suffixes, for example, en-UK
would target only systems configured for British English, which en
would target all English-speaking locales. Specifying both would show your en-UK
translation for British users and your en
translation for everyone else.
For example, if we want to override the header text on the loading overlay of the FaceValidation flow:
verbiage: {
loadingOverlay: {
headerText: {
'en-US': 'Use your device camera to capture your American face',
'en-UK': 'Use your device camera to capture your British face',
'en': 'Use your device camera to capture your generally English-speaking face'
}
}
}
Leaving a locale out of your translation object will result in the default text being shown for that locale, with the rest of your provided translations being honored. This functionality can be leveraged to define translations for languages that the IDmission Web SDK does not yet support. If you end up creating full translations for new languages, feel free to send your translations our way at https://www.idmission.com/company/contact-us/, and we will try to get them added to the main SDK translation set!
The full list of i18n locales can be found here: https://github.com/ladjs/i18n-locales.