Const
Bind the locale state to i18next, so whenever setLocale is called, it will also call i18next.changeLanguage.
setLocale
i18next.changeLanguage
import i18next from "i18next";import { connectI18next, initLocale } from "@pistonite/pure/pref";initLocale({ supported: ["en", "es"], default: "en", persist: true });i18next.use(connectI18next).init({ // ...options Copy
import i18next from "i18next";import { connectI18next, initLocale } from "@pistonite/pure/pref";initLocale({ supported: ["en", "es"], default: "en", persist: true });i18next.use(connectI18next).init({ // ...options
Bind the locale state to i18next, so whenever
setLocale
is called, it will also calli18next.changeLanguage
.Example