Skip to content

Latest commit

 

History

History
 
 

ssg

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Static internationalized (i18n) next.js website with the help of next-i18next and next-language-detector

What is this?

This is a simple example of how to use next-i18next with Next.js for a complete static website and optional use of locize to get translations up and running quickly and easily.

For more info...

You may have arrived here from the Next.js repository, from next-i18next repository or the react-i18next repository. Either way, for more documentation on:

A step by step guide can be found in this tutorial.

optional locize usage (not mandatory)

Before "deploying" your app, you can run the downloadLocales script (or similar), which will use the cli to download the translations from locize into the appropriate folder next-i18next is looking in to (i.e. ./public/locales).

Verify yourself

To prove that this works, pull this example to your local machine and run:

npm i
npm run build
npm run serve

and open your browser at http://localhost:8080

You can now deploy the out folder to any static webserver, like GitHub pages.