Nuxt.js | How to handle routing for multiple multilingual slug

Hello Allan,

Basically, when doing 2 folders with a wildcard ( _ ) at the same level this tells Nuxt that any query can go here.
So when you have _first and _second folders it will resolve your route this way:

  • If the query is anything then go to _first
  • If the query is anything then go to _second

But as the first check always pass, so it will always resolve to the _first folder

The following approaches possible in this case:

  1. Validate the response returned by each level using this . If the _first folder returns 404, then it can fallback to _second.

  2. Or you can avoid having to wildcard directory at the same level.

Let me know if you have any doubt.

Priyanka