Skip to content

Latest commit

 

History

History
 
 

plain-javascript

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Hello World (plain javascript)

The demo contains one single file:

.
└── index.html

Before running it, execute the requirements below.

Requirements

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:

  1. Click at cldr.js releases tab.
  2. Download the latest package.
  3. Unzip it.
  4. 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.

Running the demo

Once you've completed the requirements above:

  1. Point your browser at ./index.html.
  2. Open your JavaScript console to see the demo output.
  3. Understand the demo by reading the source code. We have comments there for you.