Skip to content
example using polyglot with locize
HTML CSS JavaScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
README.md
index.html
index.js
npm-debug.log
package.json
style.css

README.md

locize-polyglot-example

Example how to use polyglot and locize.com using a node.js server.

starting the sample

npm i
npm start

open localhost:8080 in your browser

What we do:

  1. We use the locize API Fetch Route to load the translations
  2. We add the translations to the returned html like described on the polyglot page
  3. 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

You can’t perform that action at this time.