Skip to content

支持的框架

i18n Ally Next 开箱即用地支持多种 i18n 框架,通过读取项目依赖文件自动检测。

Web 框架

框架包检测命名空间语言 ID
Vue I18nvue-i18n, vuex-i18n, @panter/vue-i18next-vue, js, ts, html, pug
Vue SFCvue-i18n, @panter/vue-i18nextVueSfcvue
React I18nextreact-i18next, next-i18nextjs, ts, jsx, tsx, ejs
React Intlreact-intl-js, ts, jsx, tsx
i18nexti18next(不含 react-i18nextjs, ts, jsx, tsx, ejs
i18next Shopify@shopify/react-i18n-js, ts, jsx, tsx
Next-intlnext-intljs, ts, jsx, tsx
Next Internationalnext-internationaljs, ts, jsx, tsx
Next Translatenext-translatejs, ts, jsx, tsx
Sveltesvelte-i18n-svelte, js, ts
Lingui@lingui/core-js, ts, jsx, tsx
Polyglotnode-polyglot-js, ts, jsx, tsx
i18n-tages2015-i18n-tag-js, ts

Angular

框架包检测语言 ID
ngx-translate@ngx-translate/corehtml, ts
Transloco@ngneat/translocohtml, ts

移动端

框架包检测语言 ID
Flutterflutter_i18n, flutter_localizationsdart

后端 / 其他

框架包检测语言 ID
Laravellaravel-mix, vite-plugin-laravelphp
Ruby on Railsi18n(Gemfile)ruby, erb, slim, haml
PHP Gettextgettext/gettextphp
VS Code 扩展vscodejs, ts
Chrome 扩展webextension-polyfilljs, ts, jsx, tsx
Emberember-intl, ember-i18njs, ts, handlebars
Globalizeglobalizejs, ts
UI5@openui5/sap.ui.corejs, ts, xml
Jekylljekyll-multiple-languages-pluginhtml, md
Fluent Vuefluent-vuevue, js, ts
Generali18n-ally-nextjs, ts, jsx, tsx

自定义框架

如果你的框架不在上述列表中,可以定义自定义框架来适配任何 i18n 方案。

手动选择框架

jsonc
// .vscode/settings.json
{
  "i18n-ally-next.enabledFrameworks": ["react-i18next", "custom"]
}

Released under the MIT License.