mirror of
https://github.com/ArthurDanjou/artchat.git
synced 2026-01-14 15:54:03 +01:00
12 lines
233 B
TypeScript
12 lines
233 B
TypeScript
export function useLanguage() {
|
|
const { setLocale } = useI18n({ useScope: 'global' })
|
|
|
|
async function changeLocale(newLocale: string) {
|
|
await setLocale(newLocale as 'en' | 'fr' | 'es')
|
|
}
|
|
|
|
return {
|
|
changeLocale,
|
|
}
|
|
}
|