npm install i18next i18next-http-backend react-i18next 配置i18next 接下来,你需要在项目中配置i18next。通常,你会在一个单独的文件(如i18n.js)中进行这些配置。 javascript // i18n.js import i18n from 'i18next'; import { initReactI18next } from 'react-i18next'; import HttpBackend from 'i18nex...
<!-- an example can be found in example/jquery/index.html --> i18next.use(i18nextHttpBackend).init(i18nextOptions); As with all modules you can either pass the constructor function (class) to the i18next.use or a concrete instance. If you don't use a module loader it will be ...
# npm package $ npm install i18next-http-backend Wiring up: import i18next from 'i18next'; import HttpApi from 'i18next-http-backend'; i18next.use(HttpApi).init(i18nextOptions); for Deno: import i18next from 'https://deno.land/x/i18next/index.js' import Backend from 'https://deno...