If I don't need i18n pathnames, how can I implement a generic Link? #1292
Unanswered
aboutjquery
asked this question in
Q&A
Replies: 1 comment
-
I have similar problem any news? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I recently saw the
example-app-router
demonstration updated, so I downloaded it to test it out. Now there are two languages,en
andzh
.When
config.ts
isTo display I don't need multilingual
pathnames
, I just need something likeen/products/
orzh/products/
When I use in the page
I found two problems
No. 1, for example, the current page is
zh/about/
Clicking on the above link sometimes jumps to
en/about/
and sometimes it works fine.Second, you will get an error when using
npm run build
Type error: Type ''/${string}
' is not assignable to type '"/" | "/products"`I believe it’s because I didn’t add
/contact
to thepathnames
ofconfig.ts
Pages often have many dynamic routes. If adding
pathnames
one by one is very troublesome, what should I use to make general links? I just hope to keep{locale}
operating normally.Thanks
Beta Was this translation helpful? Give feedback.
All reactions