Files
artchat/app/composables/language.ts

12 lines
211 B
TypeScript

export function useLanguage() {
const { setLocale } = useI18n()
async function changeLocale(newLocale: string) {
await setLocale(newLocale as 'en' | 'fr' | 'es')
}
return {
changeLocale,
}
}