Closed alex-flea closed 1 year ago
It seems that the problem is due to changed behavior in handling i18n.
Following the steps described in https://nextra.site/docs/guide/i18n everything works fine but index files in subfolders. At the same time, without adding middleware, just following steps described in https://nextjs.org/docs/advanced-features/i18n-routing nextra does not recognize localized files with lang postfixes for the default locale (i.e. index.en.mdx) but indexes seem to work fine. Nevertheless, i18n routing seems broken either.
Which is the correct way of setting up i18n project with nextra v2?
@alex-flea did you get this working? Same issue
@alex-flea did you get this working? Same issue
Nope. Each new update I check if it fixed but as for 2.2.9 it's still broken. As workaround I'm using index1.en.mdx
hack.
yea unfortunately everything I look at i18n is completely broken it seems
v1 worked fine with i18n. At the same time, v2 is worth hussle. As for i18n, the only problem I found is index files problem, everything else works fine.
As workaround just rename index into anything else and update your _meta accordingly.
+1
+1
Any solve yet?
@alex-flea did you get this working? Same issue
Nope. Each new update I check if it fixed but as for 2.2.9 it's still broken. As workaround I'm using
index1.en.mdx
hack.
whats the index1.en.mdx
hack? It didn' worked for me. I still have to go to "/subfolder/index1" to reach the desired page instead of "/subfolders". Can you explain?
whats the
index1.en.mdx
hack? It didn' worked for me. I still have to go to "/subfolder/index1" to reach the desired page instead of "/subfolders". Can you explain?
Yes, exactly. I ment using index1 in URLs and links meanwhile. No magic pill unfortunatelly.
As of July 16th, 2023, this is still an issue.
Somewhere between 2.0.0 and 2.2.3 index files for subfolders such as
index.en.mdx
orindex.ro.mdx
stopped working when referencing them by pretty urls, i.elocalhost:3000/subfolder
produces 404 error, butlocalhost:3000/subfolder/index
returns the corresponding page.At the same time indexes for root folder work fine, i.e.
localhost:3000
orlocalhost:3000/ro
.