#[locale]/[countryCode] not found

6 messages · Page 1 of 1 (latest)

vestal urchin
#

I've been trying to implement i18next solution for translating my app, and I've created a [locale] folder into which I passed all of the file inside 'app' directory. I managed to get the redirect mechanism to work, so it successfuly navigates to localhost:8000/[locale]/[countryCode], however as I mentioned I get 404. attached is an image of my current directory.

You might notice there is a 'Layout' page at the same level as [lcoale]. this is just an attempt, getting a 404 with or without it.

Any idea how to fix the issue? at a certain point it worked perfectly - url was ' localhost:8000/[locale]/[countryCode]' and content was displayed, but I've done some stuff I can't remember how to roll back and now I'm stuck

smoky kernel
#

This is the wrong approach as the countryCode is the first parameter. You should not use route based i18next imho

vestal urchin
#

Hey @smoky kernel, just noticed your message

  1. If not i18next, what other translation solution would you use?
  2. I made it work in local env - navigation works perfectly to all routes of my application, however in production I'm getting 500 when trying to retrieve some data, for example products.
    If I switch the order so that countryCode comes before locale, do you think it'll fix the issue? That is, when retrieving data from the backend server, is there a meaning to the actual location of countryCode?
smoky kernel
#

I18next is the way to go. depends what you implemented, countryCode is widely used by the app

vestal urchin