-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8682e81
commit 7a7dfc3
Showing
13 changed files
with
128 additions
and
227 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
docusaurus/docs/vulcan-next/features/internationalization.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Internationalization (i18n) | ||
|
||
## next-i18next latest version | ||
|
||
Next.js and its ecosystem has made a lot of progress regarding i18n while we were coding VulcanNext. | ||
We currently use the latest version of [next-i18next](https://github.com/isaachinman/next-i18next) package. | ||
Its role is to handle the loading of the right translation files depending on the user current locale. | ||
|
||
I18n is a very vast subject, if you need more advanced features, [check Next.js documentation](https://nextjs.org/docs/advanced-features/i18n-routing), it's complete and well written. | ||
|
||
You can tweak the configuration to fit your need, see the file named `next-i18next.config.js`. | ||
|
||
## No automated redirect | ||
|
||
As a default, we disable automated i18n redirect. So a French user | ||
accessing `/` will still see the page in English. You need to redirect those user manually to `/fr`. | ||
|
||
We think that this setup is more consistent, but don't hesitate to tweak the `i18n` config in `next-i18next.config.js`. | ||
|
||
## Lang and dir in the custom \_document | ||
|
||
`lang` attribute is set automatically by Next.js on `<html>` during server-render/static-render. | ||
`dir` attribute (`rtl` or `ltr` for right-to-left and left-to-right languages) is set based on the current locale. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# MDX support | ||
|
||
Get started by reading [MDXJS official doc](https://mdxjs.com/). If you want to write a blog with fancy interactive blocks, you'll fall in love with this feature. | ||
|
||
## Next-mdx-remote | ||
|
||
Thanks to [next-mdx-remote](https://github.com/hashicorp/next-mdx-remote), you can easily use markdown files as your CMS. | ||
Check the `/docs` page when running the app to see the live documentation. | ||
|
||
## MD and MDX import in React | ||
|
||
## Loading MD/MDX in Storybook | ||
|
||
Work out of the box. Will however disable default behaviour for ".md" import of Storybook, which is replaced by MDX behaviour. |
13 changes: 4 additions & 9 deletions
13
docusaurus/docs/vulcan-next/features/mongo-graphql-backend.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.