Front-end localization Vue adapter

Last modified by Manuel Leduc on 2026/03/26 17:58

Content

Reference

useI18nAdapter

Vue composer that takes a resolver and a query, a returns an object with two keys:

  • isLoading: a reactive value that becomes false once the requested translations are done
  • t: a vue-i18n locale translation function
useRemoteI18n(
    resolver: Resolver,
    query: Query,
): {
    isLoading: Ref<boolean>;
    t: ComposerTranslation<
        {},
        string,
        RemoveIndexSignature<
            { [key: string]: LocaleMessageValue<VueMessageType> },
        >,
        never,
        never,
        never,
    >;
}

Parameters

  • resolver: the resolver to use to load the translations.
  • query: the query to execute

Get Connected