-
-
Notifications
You must be signed in to change notification settings - Fork 638
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add i18nPaths for selective i18n routing #2131
Changes from all commits
22da891
01972c9
b86965a
0062e7d
952c1ef
8a32016
0e95bd8
0b63e20
f8a981b
24283b2
705c4cf
519bdeb
7161832
f763069
2d5a874
fd6f146
8634178
9801eb5
a1efd99
5c4aea5
bf2a2d7
3920471
8603593
233b1db
a8368e9
6a25760
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
const i18nPaths = { | ||
en: [ | ||
"/tools/cli" | ||
], | ||
de: [ | ||
"/tools/cli" | ||
] | ||
}; | ||
Comment on lines
+1
to
+8
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What is the use of these There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It would work as a record for the translated links. Since we are using static site generation, we needed a mechanism to predefine the translated webpages which could be used by the i18n LinkComponent |
||
|
||
export default i18nPaths; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Which usecase is handled in this
if
condition? Kindly specify that in comment.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would handle the cases where a webpage is not yet translated or there is an external website's href