This is a Next.JS App router project using the gt-next for i18n. For pages router, use the gt-react.
Translations are completely free to use for this project.
Star the libraries on GitHub to support the project.
There are slightly different steps for development and production.
- Development: uses a development API key to enable translation hot-reload
- Production: uses the
gtx-cli translatecommand to generate translations at build time
Get your API Keys from generaltranslation.com from the API Keys page.
Create a .env.local file in the root of the project and add your DEVELOPMENT API Keys:
GT_DEV_API_KEY=your-development-api-key
GT_PROJECT_ID=your-project-id
Install dependencies:
npm installRun the development server:
npm run devOpen http://localhost:3000 with your browser to see the result.
Get your API Keys from generaltranslation.com from the API Keys page.
Create a .env.local file in the root of the project and add your PRODUCTION API Keys:
GT_API_KEY=your-production-api-key
GT_PROJECT_ID=your-project-id
Install dependencies:
npm installnpm run translateRun the development server:
npm run build && npm run startOpen http://localhost:3000 with your browser to see the result.