createProvideFunction

Commons
stable

Returns a factory function that bootstraps a scoped locale instance for a component sub-tree using vue-i18n. Each call creates an isolated locale with overridable current locale, fallback, and messages props.

API

Signature

Signature TypeScript complète, extraite du fichier util.

typescript

API

Paramètres

Paramètres d'entrée acceptés par cet util.

data
requis
{ current: Ref<string> fallback: Ref<string> messages: ComputedRef<ILocaleMessages> useI18n: TUseI18nLike }
Root locale state (current locale ref, fallback ref, messages computed) and the vue-i18n useI18n composable.

API

Valeur de retour

La valeur retournée par cet util.

A factory that, given component locale props, returns an ILocaleInstance for that component sub-tree.

Usage

Exemples

Extraits de code prêts à coller.

Used internally by createVueI18nAdapter

typescript