Comment on page
Localization: Adding a Custom Language Pack
add_lang(lang_id, lang_obj)method allows adding a new or customized language pack.
lang_id: a string value that can be subsequently used as
langparameter for the
lang_obj: an object that includes identifiers of translation strings as keys and translation strings themselves as values.
A list of language identifiers:
An example of usage:
OzLiveness.add_lang('en', enTranslation), where
enTranslationis a JSON object.
// Editing the button text
action_photo_button: 'Take a photo'
A list of all language identifiers:
oz_action_*_gorefer to the appropriate gestures.
oz_tutorial_camera_*– to the hints on how to enable camera in different browsers. Others refer to the hints for any gesture, info messages, or errors.
If your language pack doesn't include a key, the translation for this key won't be shown. It also applies to the new keys that appear in updated versions: you need to add translations to all new keys for the strings to be shown.