next-translate: 404 error pages with next 14

What version of this package are you using? 2.6.1 What operating system, Node.js, and npm version? Mac, v18, v9.6.7 What happened? 404 pages with next 14 What did you expect to happen? Pages should work as usually Are you willing to submit a pull request to fix this bug? Maybe

I’m using next-translate package in some of my personal project but after upgrading to next 14, all I’m seeing is 404 pages. I’ve even tested it with the with-app-directory example you have in this repo by upgrading the next version in the example from 13.4.7 to 14.0.0. and the same error happens for all the routes.

About this issue

  • Original URL
  • State: closed
  • Created 8 months ago
  • Reactions: 20
  • Comments: 20 (6 by maintainers)

Most upvoted comments

13.4.12 is the latest version where next-translate still works. 13.4.13 breaks it.

@aralroca Still not working, here is the example

Ok thanks for the example, I’m going to take a look

@rlvk94 Let’s do this. We supported it because many people asked to be able to migrate from pages to app router and have both living together, but doing this feature was a bad idea because Next.js doesn’t support it and so it breaks a lot of things to try to maintain this. Either you use pages folder, or you use app router… I have asked Next.js to support both, but they don’t even respond.

Thanks for bumping the issue, I have been scratching my head with this error for like almost a week. The only thing I have found out is that the plugin breaks it. I tested without the plugin, and of course, the library will not translate anything… but at least it does not show a 404.

@abriginets @aralroca I don’t have i18n in my config and I am using the middleware. But I am still getting 404. I know this might be a lot to ask but can you write a small note on step by step instructions to set up next-translate in Next 14. Would help newbies like me to quickly set up for my project.

@aralroca Still not working, here is the example

I hate to say it, but I think the solution will be to remove the support for mixing pages and app router, because everything breaks adding the i18n in the Next.js configuration. I don’t understand how Next.js doesn’t support partial migration from pages to app router with i18n.