Change language by domain
-
Hi
I need to change the language by domain name in a ssr website, for example:
domain.com - English
domain.es - Spanish
domain.fr
…Is posible to do this in the boot file?
Can someone give me a suggestionThanks
-
Use some logic to figure out the language selection via the current URL root i.e. with something like
window.location.hostname
and also use the tips in this article.https://medium.com/quasar-framework/adding-full-i18n-to-quasar-150da2d5bba4
Scott
-
@jhon you might also check this thread: https://forum.quasar-framework.org/topic/4311/solved-dynamic-set-of-quasar-lang-from-store-value/22
In my boot file I am waiting for my vuex config to be restored from vuex-persist, but you could equally just check the url I would think and set the lang.