> For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt.

# Internationalization

`@modern-js/plugin-i18n` 是 Modern.js 的国际化插件，基于 [i18next](https://www.i18next.com/) 和 [react-i18next](https://react.i18next.com/) 构建。

- **插件本身**：负责与 Modern.js 框架的集成，如 SSR 语言传递、路由前缀处理等
- **i18next**：核心翻译能力，如 `t()` 函数、插值、复数、命名空间。
- **react-i18next**：React 组件和 Hook，如 `useTranslation`，实现与 React 生命周期的结合。

## Where to start?

| What you want to do                                          | Documentation                                                                                                    |
| ------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------- |
| Integrate for the first time and run an example              | [Quick Start](/guides/advanced-features/international/quick-start.md)                                            |
| Learn all configuration options                              | [Configuration](/guides/advanced-features/international/configuration.md)                                        |
| Detect language from URL / Cookie / Header                   | [Locale Detection](/guides/advanced-features/international/locale-detection.md)                                  |
| Implement paths with locale prefixes, such as `/en/about`    | [Routing Integration](/guides/advanced-features/international/routing.md)                                        |
| Load translation resources from a remote service or platform | [Resource Loading -> Custom Backend](/guides/advanced-features/international/resource-loading.md#custom-backend) |
| SSR, multiple entries, or custom instances                   | [Advanced Usage](/guides/advanced-features/international/advanced.md)                                            |
| Look up Hooks / components / type definitions                | [API Reference](/guides/advanced-features/international/api.md)                                                  |

## Core Capabilities

- **Locale detection**: Supports detection from URL path, Cookie, LocalStorage, request headers, browser settings, and other sources, with configurable priority.
- **Resource loading**: Supports HTTP static files, file system loading for SSR, custom SDK functions, and chained backend progressive loading.
- **Routing integration**: Automatically adds locale path prefixes such as `/en/about`, and provides the `I18nLink` component for locale-aware navigation.
- **SSR support**: Detects the language on the server and injects it into the page so the client can reuse it directly and avoid language flicker.
- **TypeScript support**: Provides complete type definitions and supports type-safe translation keys.
