https://github.com/stealjs/steal-conditional-substitution-example
Steal-conditional string substitution syntax demo
https://github.com/stealjs/steal-conditional-substitution-example
Last synced: 2 months ago
JSON representation
Steal-conditional string substitution syntax demo
- Host: GitHub
- URL: https://github.com/stealjs/steal-conditional-substitution-example
- Owner: stealjs
- License: mit
- Created: 2017-01-23T16:42:09.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2019-06-20T16:43:02.000Z (almost 6 years ago)
- Last Synced: 2025-01-21T03:43:15.552Z (4 months ago)
- Language: JavaScript
- Homepage: https://stealjs.com/docs/steal-conditional.html#string-substitution-syntax
- Size: 6.84 KB
- Stars: 0
- Watchers: 6
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# steal-conditional string substitution demo
Example app using steal-conditional's [string substitution syntax](http://stealjs.com/docs/StealJS.guides.substitution_conditional_loading.html) 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:
1. Clone this repo
2. Run `npm install`
3. Run `npm start`
4. Open `index.html` in your browser
# Building the application
1. Run `npm build`
2. Edit `index.html` to load `steal.production.js`
3. Open in your browser