Skip to content

Commit 01d465c

Browse files
committed
merging PR #17
2 parents b1a4ccf + 1ffb88b commit 01d465c

File tree

1 file changed

+26
-25
lines changed

1 file changed

+26
-25
lines changed

README.md

Lines changed: 26 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -12,46 +12,47 @@ Dust helpers for internationalization.
1212
### Browser
1313

1414
1. Install with [bower](http://bower.io/): `bower install dust-helper-intl`
15-
2. Load the scripts into your page. (It does not matter which order the scripts are loaded in.)
15+
2. Load the scripts into your page.
1616

17-
```html
18-
<script src="dustjs-linkedin.js"></script>
19-
<script src="dust-helper-intl.js"></script>
20-
```
17+
```html
18+
<script src="intl-messageformat.js"></script>
19+
<script src="dustjs-linkedin.js"></script>
20+
<script src="dust-helper-intl.js"></script>
21+
```
2122

2223
3. Register the helpers:
2324

24-
```javascript
25-
DustHelperIntl.register(dust);
26-
```
25+
```javascript
26+
DustHelperIntl.register(dust);
27+
```
2728

2829

2930
### Node/CommonJS
3031

3132
1. You can install the helpers with npm: `npm install dust-helper-intl`
3233
2. Load in the module and register it:
3334

34-
```javascript
35-
var Dust = require('dustjs-linkedin');
36-
global.Intl = require('intl');
37-
require('dust-helper-intl').register(Dust);
38-
```
35+
```javascript
36+
var Dust = require('dustjs-linkedin');
37+
global.Intl = require('intl');
38+
require('dust-helper-intl').register(Dust);
39+
```
3940

40-
**NOTE:** Since node (as of 0.10) doesn't provide the global `Intl` object
41-
(ECMA-402) you'll need to provide a polyfill. The `intl` NPM package can
42-
provide this or you can use another.
41+
**NOTE:** Since node (as of 0.10) doesn't provide the global `Intl` object
42+
(ECMA-402) you'll need to provide a polyfill. The `intl` NPM package can
43+
provide this or you can use another.
4344

4445

4546
### AMD
4647

4748
1. Install with [bower](http://bower.io/): `bower install dust-form-helpers`
4849
3. Load in the module and register it:
4950

50-
```javascript
51-
define(['dust', 'dust-helper-intl'], function(Dust, DustHelperIntl) {
52-
DustHelperIntl.register(Dust);
53-
});
54-
```
51+
```javascript
52+
define(['dust', 'dust-helper-intl'], function(Dust, DustHelperIntl) {
53+
DustHelperIntl.register(Dust);
54+
});
55+
```
5556

5657

5758
## Usage
@@ -94,7 +95,7 @@ Output:
9495
Template:
9596

9697
```js
97-
var tmpl = '<time>{@intlDate val=' + dateStr + ' hour="numeric" minute="numeric" timeZone="UTC"/}</time>',
98+
var tmpl = '<time>{@intlDate val=' + dateStr + ' hour="numeric" minute="numeric" timeZone="UTC"/}</time>';
9899
```
99100

100101
Output:
@@ -126,21 +127,21 @@ Output:
126127
Template:
127128

128129
```js
129-
var tmpl = '<b>{@intlNumber val=40000.004 /}</b>',
130+
var tmpl = '<b>{@intlNumber val=40000.004 /}</b>';
130131
```
131132

132133
Output:
133134

134135
```html
135-
<b>40,000.005</b>
136+
<b>40,000.004</b>
136137
```
137138

138139
####Basic (de-DE)
139140

140141
Template:
141142

142143
```js
143-
var tmpl = '<b>{@intlNumber val=40000 locales="de-DE"/}</b>',
144+
var tmpl = '<b>{@intlNumber val=40000.004 locales="de-DE"/}</b>';
144145
```
145146

146147
Output:

0 commit comments

Comments
 (0)