Example how to use polyglot and locize.com using a node.js server.
npm i
npm start
open localhost:8080 in your browser
- We use the locize API Fetch Route to load the translations
- We add the translations to the returned html like described on the polyglot page
- From there use the polyglot function like used
Alternatively you could also load the resources via xhr and append that to polyglot via polyglot.extend