Skip to content

Files

Latest commit

 

History

History

next-i18next

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

next-pwa - i18n example (TODO: broken, need fix)

[TOC]

This example demonstrates how to use next-pwa plugin to turn a next.js based web application into a progressive web application easily.

It uses express to build a custom server and use next-i18next as a i18n solution.

The express middleware i18next-express-middleware is not compatible with fastify right not unfortunately.

Because service worker sw.js must be served directly without any redirection, make sure it's route is excluded from the i18n middleware is a bit tricky. Please see index.js for more details.

Usage

Open in Gitpod

cd examples/next-i18next
yarn install
yarn build
yarn start

Then try out following path:

https://localhost:3000/
https://localhost:3000/en
https://localhost:3000/zh