Front-end localization Vue adapter
Last modified by Manuel Leduc on 2026/07/31 16:04
Content
Reference
useI18nAdapter
Vue composer that takes a resolver and a query and 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
export function useI18nAdapter(resolver: Resolver, query: Query): {
t: Composer["t"];
isLoading: Ref<boolean>;
};Parameters
- resolver: the resolver to use to load the translations.
- query: the query to execute