No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Change language by domain

    Help
    3
    3
    203
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • J
      jhon last edited by

      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 suggestion

      Thanks

      1 Reply Last reply Reply Quote 0
      • s.molinari
        s.molinari last edited by

        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

        1 Reply Last reply Reply Quote 0
        • ssuess
          ssuess last edited by

          @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.

          1 Reply Last reply Reply Quote 1
          • First post
            Last post