SonentaProvider
SonentaProvider
Section intitulée « SonentaProvider »Wrap your app once. Key SonentaConfig props:
| Prop | Type | Description | |
|---|---|---|---|
token | string | required | API key (snt_live_<prefix>.<secret>, missing:write scope). |
projectUuid | string | required | The project this provider is bound to. |
defaultLocale | string | required | Initial BCP-47 locale (e.g. en). |
apiBase | string | optional | API base; defaults to https://api.sonenta.dev. |
namespaces | string[] | optional | Namespaces to preload (default ["common"]). |
fallbackLng | string|string[] | optional | Fallback locale chain. |
a11ySurfaces | string[] | optional | Eager-load a11y overlays: aria_label, alt_text, screen_reader, plain_language. |
plainLanguage | boolean | optional | Start with the FALC simplified-language mode on. |
initialBundles | object | optional | Offline/SSR snapshot (locale → namespace → tree). |
import { SonentaProvider } from "@sonenta/react-i18next";
<SonentaProvider apiBase="https://api.sonenta.dev" projectUuid="<PROJECT_UUID>" token="snt_live_<prefix>.<secret>" defaultLocale="en" namespaces={["common"]}> <App /></SonentaProvider>