rsnext/examples/with-i18n-rosetta
2020-05-18 15:24:37 -04:00
..
components Rosetta i18n example (#11841) 2020-04-21 12:49:18 -05:00
hooks Rosetta i18n example (#11841) 2020-04-21 12:49:18 -05:00
lib Upgrade to Prettier 2 (#13061) 2020-05-18 15:24:37 -04:00
locales Rosetta i18n example (#11841) 2020-04-21 12:49:18 -05:00
pages Upgrade to Prettier 2 (#13061) 2020-05-18 15:24:37 -04:00
next.config.js Rosetta i18n example (#11841) 2020-04-21 12:49:18 -05:00
package.json Rosetta i18n example (#11841) 2020-04-21 12:49:18 -05:00
README.md Rosetta i18n example (#11841) 2020-04-21 12:49:18 -05:00

rosetta example

This example uses 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:

Deploy with Vercel

How to use

Using create-next-app

Execute create-next-app with npm or Yarn to bootstrap the example:

npm init 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:

curl https://codeload.github.com/zeit/next.js/tar.gz/canary | tar -xz --strip=2 next.js-canary/examples/with-i18n-rosetta
cd with-i18n-rosetta

Install it and run:

npm install
npm run dev
# or
yarn
yarn dev

Deploy it to the cloud with Vercel (Documentation).