Nuxtjs regions in the URL address

263 views Asked by At

I'm planning a project on Nuxt.js, but at the moment I can't find an elegant solution for the regions functionality. I would be very grateful for an idea that will help you implement the functionality in which the prefix of the selected region was added to the URLs.Example:


https://example.net/.../ - default region (EU region)


https://example.net/eu/.../ - EU region


https://example.net/au/.../ - AU region


Something similar is done by nuxt/i18n, but the problem is that each region can have several languages. At the moment, there is only one idea - to do this via NGINX, but I'm not sure yet whether it will work (take each url with the region prefix and proxy it to localhost: 3000 as an example). I don't ask you to write the code for yourself, I just need advice on which way to go. If you have any ideas, I would be very grateful.

0

There are 0 answers