@realeyes/verifeye-sdk 1.1.2 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -29,6 +29,34 @@ The SDK handles the browser-side capture and the calls to the VerifEye Service.
29
29
  npm install @realeyes/verifeye-sdk
30
30
  ```
31
31
 
32
+ ## Localization
33
+
34
+ The SDK's built-in UI text — dialog titles, buttons, hints, etc. — is driven by a locale file and can be translated or overridden per key.
35
+
36
+ ```tsx
37
+ <VerifyVerifier
38
+ // ...session props
39
+ lang="en"
40
+ langOverrides={{
41
+ consent_title: "One quick check",
42
+ consent_continue_button: "Continue",
43
+ }}
44
+ />
45
+ ```
46
+
47
+ - **`lang`** — language tag, defaults to `"en"`. Case-insensitive, and `_` is accepted for `-`. An unsupported value logs a warning and falls back to `"en"` rather than throwing.
48
+ - **`langOverrides`** — a flat map of per-key replacements applied on top of `lang`. Only the keys you pass are replaced. The `VerifyTextKey` type is exported, so keys autocomplete and typos fail to compile.
49
+
50
+ ### Supported languages
51
+
52
+ `en` `bg` `cs` `da` `de` `el` `es` `et` `fi` `fr` `hu` `id` `it` `ja` `ko` `lt` `lv` `nb` `nl` `pl` `pt-BR` `pt-PT` `ro` `ru` `sk` `sl` `sv` `tr` `uk` `zh-Hans` `zh-Hant`
53
+
54
+ Also exported as `SUPPORTED_LANGUAGES`. Tags resolve in this order: exact match, then a known alias, then the base language. So `"de-AT"` → `de`, `"zh-TW"` → `zh-Hant`, `"zh-CN"` → `zh-Hans`, `"pt"` → `pt-PT`, `"no"` → `nb`. Portuguese and Chinese are shipped only as variants — a bare `"pt"` or `"zh"` resolves to the alias above rather than failing.
55
+
56
+ Some strings carry a small markup subset so a whole sentence stays translatable as one unit: `<b>…</b>` for emphasis, `<br/>` for a line break, and `{name}` slots (e.g. `{privacyPolicy}` in the consent notice, `{seconds}` in the timeout countdown). Anything else is rendered as literal text — override values are never interpreted as HTML.
57
+
58
+ Keys prefixed `liveness_` translate the liveness check UI shown during the liveness step.
59
+
32
60
  ## Privacy & data handling
33
61
 
34
62
  This SDK captures camera images and processes facial/biometric data to perform verification. When integrating it, you are responsible for obtaining appropriate user consent and complying with applicable privacy and biometric-data regulations in your jurisdiction. See the [Realeyes Privacy Policy](https://realeyes.ai/privacy-policy/).