Skip to content

How to manually create localized routes with modules? #2117

Answered by simkuns
simkuns asked this question in Q&A
Discussion options

You must be logged in to vote

I was able to solve #discussion-5245536 by excluding pages containing routesNamesSuffix from analyzeNuxtPages.

patches/@nuxtjs+i18n+8.0.0-beta.12.patch

diff --git a/node_modules/@nuxtjs/i18n/dist/module.mjs b/node_modules/@nuxtjs/i18n/dist/module.mjs
index 3ed0b53..1b75583 100644
--- a/node_modules/@nuxtjs/i18n/dist/module.mjs
+++ b/node_modules/@nuxtjs/i18n/dist/module.mjs
@@ -672,17 +672,27 @@ function setupPages(options, nuxt, additionalOptions = {
       pagesDir,
       pages: /* @__PURE__ */ new Map()
     };
-    analyzeNuxtPages(ctx, pages);
-    const analyzer = (pageDirOverride) => analyzeNuxtPages(ctx, pages, pageDirOverride);
+    const unprefixedPages = [];
+    const already…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by simkuns
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant