API
September 6, 2025 · View on GitHub
To avoid unnecessary duplicate document content, some of the documents in this library are linked to the content in
i18n-pro
Thei18n-prorelated link in the current document is based on the3.0.0version. If you are using a different version, you need to check the document corresponding to the version you are using to avoid inconsistent usage
Table of Contents
I18nProvider
Configure container components for internationalization initialization properties
Type
( props: I18nState & { children: JSXElement }, ) => JSXElement
Parameter Description
The other parameters are consistent with the initI18n parameters| Parameter name | Description |
|---|---|
| children | Content that requires internationalization |
useI18n
Hook method for obtaining internationalization API and state
Note: Since i18nState is a reactive state, it needs to be accessed as i18nState() when used
Type
() => ({
t,
setI18n,
i18nState,
})