Example app using steal-conditional's string substitution syntax to perform internationalization
The file structure of this demo looks like this:
├── index.html
├── index.js
├── lang.js
├── locale/
│ ├── ar.js
│ ├── en.js
│ ├── es.js
│ ├── hi.js
│ └── zh.js
└── package.json
index.js
is the main module and it uses the steal-conditional
syntax to load a translation file; lang.js
is the condition module used to determine which of the translation files (the files inside the locale
folder) should be loaded when the demo is executed in the browser.
In order to run the demo in your browser follow the steps below:
- Clone this repo
- Run
npm install
- Run
npm start
- Open
index.html
in your browser
- Run
npm build
- Edit
index.html
to loadsteal.production.js
- Open in your browser