Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A 404 error is returned when accessing pages in other than the one set as the default locale. #1232

Open
kengo2003 opened this issue Dec 22, 2024 · 0 comments

Comments

@kengo2003
Copy link

kengo2003 commented Dec 22, 2024

What version of this package are you using?

"next-translate": "^2.6.2",
"next-translate-plugin": "^2.6.2",

What operating system, Node.js, and npm version?

  • MacOS
  • Node v20.9.0
  • Bun 1.1.21
  • Nextjs 15.1.0
  • React 19
  • No middleware is used.

What happened?

A 404 error is returned when accessing pages in other than the one set as the default locale.Accessing /ja or /fr results in a 404 error.
If you change the default locale to ja or fr, characters will be output correctly when you type /, but if you access a page in another locale, you will still get a 404 error.

What did you expect to happen?

I want to retrieve and output data from the JSON files stored in locales/ja/ and locales/fr/ when accessing /ja or /fr.

This is the content of i18n.json.

{
  "locales": ["en", "ja", "fr"],
  "defaultLocale": "ja",
  "localeDetection": false,
  "pages": {
    "*": ["common"],
    "/about": ["about"]
  }
}

At this time, we believe that this may be due to version compatibility issues with App Router or Next.js, but we have not yet found a solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant