https://github.com/shunkakinoki/next.js3
https://github.com/shunkakinoki/next.js3
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/shunkakinoki/next.js3
- Owner: shunkakinoki
- Created: 2020-06-15T05:47:17.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2020-06-15T05:47:24.000Z (almost 5 years ago)
- Last Synced: 2025-03-06T21:58:02.786Z (2 months ago)
- Language: JavaScript
- Size: 3.91 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# rosetta example
This example uses [rosetta](https://github.com/lukeed/rosetta), react hooks and context to provide a SSR, SSG, CSR compatible i18n solution.
In `next.config.js` you can configure the fallback language.
## Deploy your own
Deploy the example using [Vercel](https://vercel.com):
[](https://vercel.com/import/project?template=https://github.com/vercel/next.js/tree/canary/examples/with-i18n-rosetta)
## How to use
### Using `create-next-app`
Execute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app) with [npm](https://docs.npmjs.com/cli/init) or [Yarn](https://yarnpkg.com/lang/en/docs/cli/create/) to bootstrap the example:
```bash
npx create-next-app --example with-i18n-rosetta with-i18n-rosetta
# or
yarn create next-app --example with-i18n-rosetta with-i18n-rosetta
```### Download manually
Download the example:
```bash
curl https://codeload.github.com/vercel/next.js/tar.gz/canary | tar -xz --strip=2 next.js-canary/examples/with-i18n-rosetta
cd with-i18n-rosetta
```Install it and run:
```bash
npm install
npm run dev
# or
yarn
yarn dev
```Deploy it to the cloud with [Vercel](https://vercel.com/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)).