Latest commit c22258d Nov 15, 2018
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
public initial razzle Jun 30, 2017
src Update server.js Nov 15, 2018
.babelrc Update dependencies Aug 1, 2018
.gitignore Update dependencies Aug 1, 2018
README.md adds better ssr support and example Jun 30, 2017
package.json update all samples Oct 3, 2018

README.md

Getting started

Build with razzle using its react ssr.

# npm start

open:

will detect language: http://localhost:3000

german: http://localhost:3000/?lng=de

english: http://localhost:3000/?lng=en

production

# npm run build
# npm run start:prod

Learn more

  • Uses express to also serve translations for clientside
  • Translations are passed down to client on initial serverside render -> no reload of translations, no flickering
  • Uses i18next-express-middleware on the serverside to assert that every request gets his own instance of i18next (no race condition conflicts when user b overrides set language in i18next singleton of user a!!!)
  • completely allows saveMissing feature of i18next -> added content will be pushed to server and stored in xyz.missing.json