You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 3, 2019. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+7-6Lines changed: 7 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -2,19 +2,17 @@
2
2
3
3
## Dependencies
4
4
5
-
* Requires [messageformat.js](https://github.com/messageformat/messageformat.js) 1.0.0-rc.3 or higher
5
+
* Requires [messageformat.js](https://github.com/messageformat/messageformat.js) 1.0.0 or higher
6
6
7
7
## Install
8
8
9
9
```
10
10
npm install messageformat-loader
11
11
```
12
12
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
14
-
15
13
## Usage
16
14
17
-
[Documentation: Using loaders](http://webpack.github.io/docs/using-loaders.html)
15
+
[Documentation: Using loaders](https://webpack.js.org/concepts/loaders/#using-loaders)
@@ -33,16 +31,19 @@ You'll also need another loader (like [json-loader](https://github.com/webpack/j
33
31
### example.js
34
32
35
33
```javascript
36
-
var messages =require('messageformat-loader?locale=en!json-loader!./messages.json');
34
+
var messages =require('messageformat-loader?locale=en!./messages.json');
37
35
messages['ordinal-example']({ N:1 });
38
36
// => 'The 1st message.'
39
37
```
40
38
41
-
## Options (passed as [query parameters](http://webpack.github.io/docs/using-loaders.html#query-parameters))
39
+
## Options
42
40
43
41
*[`locale`](https://messageformat.github.io/messageformat.js/doc/MessageFormat.html#MessageFormat) 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
42
*[`disablePluralKeyChecks`](https://messageformat.github.io/messageformat.js/doc/MessageFormat.html#disablePluralKeyChecks) By default, messageformat.js throws an error when a statement uses a non-numerical key that will never be matched as a pluralization category for the current locale. Use this argument to disable the validation and allow unused plural keys. Defaults to `false`.
45
43
*[`intlSupport`](https://messageformat.github.io/messageformat.js/doc/MessageFormat.html#setIntlSupport) Enable or disable support for the default formatters, which require the Intl object. Defaults to `false`.
44
+
*[`biDiSupport`](https://messageformat.github.io/messageformat.js/doc/MessageFormat.html#setBiDiSupport) Enable or disable the addition of Unicode control characters to all input to preserve the integrity of the output when mixing LTR and RTL text. Defaults to `false`.
45
+
*[`formatters`](https://messageformat.github.io/messageformat.js/doc/MessageFormat.html#addFormatters) Add custom formatter functions to this MessageFormat instance.
46
+
*[`strictNumberSign`](https://messageformat.github.io/messageformat.js/doc/MessageFormat.html#setStrictNumberSign) Follow the stricter ICU MessageFormat spec and throw a runtime error if # is used with non-numeric input. Defaults to `false`.
0 commit comments