The demo contains one single file:
.
└── index.html
Before running it, execute the requirements below.
1. Dependencies
Globalize's dependencies are listed on Getting Started, and the only one is cldr.js. You are free to fetch it the way you want. But, as an exercise of this demo, we'll download it ourselves. So:
- Click at cldr.js releases tab.
- Download the latest package.
- Unzip it.
- Copy its
dist/
files into this directory.
Then, you'll get this:
.
├── cldr
│ └── supplemental.js
├── cldr.js
└── index.html
For more information read cldr.js' usage and installation docs.
2. CLDR content
Another tipical Globalize requirement is to fetch CLDR content yourself. But, on this demo we made the things a little easier for you: we've embedded static JSON into the demo. So, you don't need to actually fetch it anywhere.
No action needed here.
Once you've completed the requirements above:
- Point your browser at
./index.html
. - Open your JavaScript console to see the demo output.
- Understand the demo by reading the source code. We have comments there for you.