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
The i18n-pro related link in the current document is based on the 3.0.0 version. 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

  createI18n
    Type
    Parameter Description

createI18n

Initialize internationalization state and return its plugin function
It will register the following 3 properties on Vue's prototype properties. You can click on the links to view their respective types and usage instructions

Type

(
  props: I18nState & { with$?: boolean },
) => (Vue: VueConstructor) => void

Parameter Description

The other parameters are consistent with the initI18n parameters
Parameter name Description
with$ Registered prototype properties, do you need to bring prefix $ when used

The default is TRUE, you can only access the properties through $t, $setI18n, $i18nState ; if configured to false, you can directly access the properties through t, setI18n, i18nState