Comments (9)
It seems like getStaticPaths does not get the translated routes from the _routes.json file.
It looks like it's impossible to combine this library with SSG sadly. I hope this feature will be added soon.
Edit:
I made it work, going to post the solution later.
from next-translate-routes.
Really need this feature too
from next-translate-routes.
Hi, @draxx318 is there any improvements on solution?
from next-translate-routes.
Sorry, I don't get it, could you explain your issue?
I also have some getStaticPaths
and it works well...
You should not have anything to do here: getStaticPaths
creates the dynamic file paths, which is then redirected and rewritten using next-translate-routes.
from next-translate-routes.
Sorry, I don't get it, could you explain your issue? I also have some
getStaticPaths
and it works well... You should not have anything to do here:getStaticPaths
creates the dynamic file paths, which is then redirected and rewritten using next-translate-routes.
I am facing the same problem : getStaticProps does not work with translated routes
if you refresh the page, props will pass from getStaticProps to the page.
but if you click the Link from translateRoute, the page wont grab props from getStaticProps
from next-translate-routes.
It seems like getStaticPaths does not get the translated routes from the _routes.json file. It looks like it's impossible to combine this library with SSG sadly. I hope this feature will be added soon.
Edit: I made it work, going to post the solution later.
Can't wait to see your solution!
from next-translate-routes.
🤔 Strange... I don't have this issue anywhere. Could you provide a minimal reproduction?
from next-translate-routes.
I just found out that if your file contains middleware.ts, getStaticProps will immediately fail.
from next-translate-routes.
I just found out that if your file contains middleware.ts, getStaticProps will immediately fail.
Yes. See here
So this issue is a duplicate of this one, let's close it.
from next-translate-routes.
Related Issues (20)
- fileUrlToUrl breaks on 404 HOT 2
- Add support for Next 13 `/app` directory HOT 4
- Update LinkProps to support Next.js 13 <Link> component HOT 2
- Update pagesDirs to support Next.js 11 pages path HOT 1
- Next Link supports ref, but next-translate-routes does not HOT 1
- Routing does not work any more after update to next 13.3.0 HOT 7
- Add the ability to export the translations directly from the pages HOT 1
- How can I use it in storybook? HOT 1
- Static segment after dynamic segment? HOT 2
- How to work with dynamic routes? HOT 1
- The page could not be found on refresh HOT 2
- Mailto links are broken since v.1.9.2 HOT 1
- The querystring API is considered Legacy
- 404 req when deployed on Vercel HOT 8
- Error: spawn E2BIG when running in Docker HOT 19
- Module not found: Can't resolve 'next/dist/shared/lib/router-context' HOT 3
- Redirection issue using getServerSideProps HOT 2
- codesandbox link in readme isn't working
- Module not found: Can't resolve 'next/dist/shared/lib/router-context' HOT 8
- I'm using [email protected] with pages router, but still getting the "does not support `/app` directory yet." error HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from next-translate-routes.