mirror of https://github.com/alibaba/ice.git
* feat: add SuspenseWrappers to Runtime (#7131) * feat: add SuspenseWrappers to Runtime * chore(runtime): format code * fix(runtime): Apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * fix(runtime): remove redundant composeSuspenseWrappers function --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * chore: update versions (#7133) * chore: update versions * Remove 3.6.6 entry from CHANGELOG Removed version 3.6.6 entry from CHANGELOG. * Update package.json * Update CHANGELOG.md * Downgrade version from 1.1.7 to 1.1.6 * Remove changelog entry for version 1.2.7 Removed version 1.2.7 entry from changelog. * Update package.json * Update CHANGELOG.md * Update package.json * Update package.json * Update package.json * Update pnpm-lock.yaml --------- Co-authored-by: Mixiu <112144929+riopop@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> |
||
|---|---|---|
| .. | ||
| src | ||
| CHANGELOG.md | ||
| README.md | ||
| build.config.mts | ||
| package.json | ||
| runtime.d.ts | ||
| tsconfig.json | ||
| types.d.ts | ||
README.md
@ice/plugin-i18n
组件功能描述
Install
$ npm i @ice/plugin-i18n --save-dev
Usage
import { defineConfig } from '@ice/app';
import i18n from '@ice/plugin-i18n';
export default defineConfig({
plugins: [
i18n({
locales: ['zh-CN', 'en-US'],
defaultLocale: 'zh-CN',
}),
],
});
Options
locales
- type:
string[]
The locales you want to support in your app. This option is required.
defaultLocale
- type:
string
The default locale you want to be used when visiting a non-locale prefixed path. This option is required.
autoRedirect
- type:
boolean - default:
true
Redirect 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.