Skip to content

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

@kengo2003

Description

@kengo2003

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions