https://github.com/bestguy/knockout3-durandal-i18n
Knockout 3 example showing some nice Angular-like features using Durandal, Knockout.Punches, and require.js
https://github.com/bestguy/knockout3-durandal-i18n
Last synced: about 1 year ago
JSON representation
Knockout 3 example showing some nice Angular-like features using Durandal, Knockout.Punches, and require.js
- Host: GitHub
- URL: https://github.com/bestguy/knockout3-durandal-i18n
- Owner: bestguy
- Created: 2013-12-16T19:30:28.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2016-04-11T19:03:35.000Z (about 10 years ago)
- Last Synced: 2024-04-14T09:18:03.303Z (about 2 years ago)
- Language: JavaScript
- Homepage:
- Size: 638 KB
- Stars: 4
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
# Internationalization using Knockout 3, i18next, Knockout.Punches, and Durandal
Example showing internationalization in a Knockout 3 app using i18next and Knockout.Punches
## Demos:
### {{ handlebars }}
Handlebars text insertion instead of the usual `data-bind="text: ..."`
```
This is {{ someObservable }}. I like it.
```
This can also be used directly inside of attributes:
```
This is {{ someObservable }}
```
instead of the usual `data-bind="attr: { someAttribute: ... }"`
### I18N text filter using i18next:
#### {{ 'internationalized.text' | i18n }}
```
This is a localized string: {{ 'home.label' | i18n }}
```
## Libraries
- **Knockout 3** - [http://knockoutjs.com](http://knockoutjs.com)
- Used for data-binding between JavaScript models and the DOM
- **Knockout.Punches** - [http://mbest.github.io/knockout.punches/](http://mbest.github.io/knockout.punches/)
- Uses new KO3 APIs to add Angular-style handlebars and filter functionality.
- **i18next** - [http://i18next.com/](http://i18next.com/)
- Internationalization library
- **Durandal** - [http://durandaljs.com](http://durandaljs.com)
- SPA Application library built on Knockout and requirejs that adds advanced modules and view transition functionality.
## Running:
(Ensure you have installed node.js (https://nodejs.org) and bower (http://bower.io))
npm install
bower install
node app.js