Seed Bible extension API (v1.19.0) / seed-bible/extensions / useI18n
Variable: useI18n
const useI18n: (ns?: string) => SandboxI18nHook;The strings hook for an extension's views, the same one Seed Bible's shared components use: useI18n(sb.extensionId) for the extension's own strings, useI18n() for Seed Bible's. Redraws when the language changes.
Parameters
| Parameter | Type |
|---|---|
ns? | string |
Returns
Example
const { t } = useI18n(sb.extensionId);
return <h2>{t("title")}</h2>;