Skip to content
This repository was archived by the owner on Jan 3, 2019. It is now read-only.

Commit 1abaac5

Browse files
committed
Document options
1 parent 66f9ecc commit 1abaac5

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,7 @@
1010
npm install messageformat-loader
1111
```
1212

13-
You'll also need another loader (like [json-loader](https://github.com/webpack/json-loader)) to actually load the JSON strings
14-
15-
```
16-
npm install json-loader
17-
```
13+
You'll also need another loader (like [json-loader](https://github.com/webpack/json-loader) or [multi-json-loader](https://github.com/cletusw/multi-json-loader)) to actually load the JSON strings
1814

1915
## Usage
2016

@@ -37,11 +33,15 @@ npm install json-loader
3733
### example.js
3834

3935
``` javascript
40-
var messages = require('messageformat!json!./messages.json');
36+
var messages = require('messageformat?locale=en!json!./messages.json');
4137
messages['ordinal-example']({ N: 1 });
4238
// => 'The 1st message.'
4339
```
4440

41+
## Options (passed as [query parameters](http://webpack.github.io/docs/using-loaders.html#query-parameters))
42+
43+
* `locale` The [CLDR language code](http://www.unicode.org/cldr/charts/29/supplemental/language_territory_information.html) to pass to [messageformat.js](https://messageformat.github.io/messageformat.js/doc/MessageFormat.html). Defaults to `en`.
44+
4545
## License
4646

4747
MIT

0 commit comments

Comments
 (0)