Introduction to @modern-js/plugin-i18n
main@modern-js/plugin-i18n is the internationalization plugin for Modern.js. It is built on top of i18next and react-i18next to provide a seamless i18n experience within the Modern.js framework.
Key features include:
- Framework Integration: Handles SSR (Server-Side Rendering) language passing and automatic route prefix handling.
- Core Translation: Leverages
i18nextfor functions liket(), interpolation, plurals, and namespaces. - React Integration: Leverages
react-i18nextto provide React components and Hooks (e.g.,useTranslation) that work with the React lifecycle.