Hello, your component is exactly what I was looking for. I really hope I can make it work, from what I've read you exactly addressed my need (which is interestingly not a out-of-the-box thing from Next).
What happened?
I successfully installed the package with yarn add next-translate-routes
I imported withTranslateRoutes on line 1 of next.config.js as follows: const withTranslateRoutes = require('next-translate-routes/plugin');
I wrapped, as indicated, the config in next.config.js with withTranslateRoutes instead of nextTranslate
I obtain the following error:
error - ./pages/_app.jsError: [next-translate-routes] - No withTranslateRoutes high order component found in _app.
What am I missing, what am I doing wrong? Looking forward to hearing from you :)
P.S. I created one _routes.json at my pages root level, and added one single page to test.
Hello, your component is exactly what I was looking for. I really hope I can make it work, from what I've read you exactly addressed my need (which is interestingly not a out-of-the-box thing from Next).
What happened?
yarn add next-translate-routes
withTranslateRoutes
on line 1 ofnext.config.js
as follows:const withTranslateRoutes = require('next-translate-routes/plugin');
next.config.js
withwithTranslateRoutes
instead ofnextTranslate
error - ./pages/_app.js
Error: [next-translate-routes] - No withTranslateRoutes high order component found in _app.
What am I missing, what am I doing wrong? Looking forward to hearing from you :)
P.S. I created one
_routes.json
at mypages
root level, and added one single page to test.