packages/plugin-i18n/README.md
组件功能描述
$ npm i @ice/plugin-i18n --save-dev
import { defineConfig } from '@ice/app';
import i18n from '@ice/plugin-i18n';
export default defineConfig({
plugins: [
i18n({
locales: ['zh-CN', 'en-US'],
defaultLocale: 'zh-CN',
}),
],
});
localesstring[]The locales you want to support in your app. This option is required.
stringThe default locale you want to be used when visiting a non-locale prefixed path. This option is required.
booleantrueRedirect to the preferred locale automatically. This option should be used with the middleware. If you deploy your application in production, you should read the example for more detail.