Reputation: 189
I'm using vue3 with i18n-vue with language prefix. i18n-vue provides language detection (probably using browser language). How do I add custom detection?
eg) when a user hits /, i18n performs language detection, and routes to /en. this is good for most cases, except:
when a user is from a carrier X (hypothetically), instead of using i18n's language detection, i would like to override the default language to say, /es
Thanks
Upvotes: 0
Views: 84
Reputation: 189
found the solution:
create middleware/redirect.global.ts, and redirect from it
Upvotes: 0