README.md in i18n-js-3.0.0.rc12 vs README.md in i18n-js-3.0.0.rc13
- old
+ new
@@ -13,10 +13,14 @@
- Number localization
- Locale fallback
- Asset pipeline support
- Lots more! :)
+## Version Notice
+The `master` branch (including this README) is for latest `3.0.0.rc` instead of `2.x`.
+
+
## Usage
### Installation
#### Rails app
@@ -250,20 +254,34 @@
- file: "public/javascripts/i18n/translations.js"
pretty_print: true
```
+#### Javscript Merge (:js_extend option)
+
+By default, the output file Javascript will call the `I18n.extend` method to ensure that newly loaded locale
+files are shallow-merged with any locale data already in memory. To disable this either globally or per-file,
+set the `js_extend` option to false
+
+```yaml
+js_extend: false # this will disable Javascript I18n.extend globally
+translations:
+- file: "public/javascripts/i18n/translations.js"
+ js_extend: false # this will disable Javascript I18n.extend for this file
+```
+
+
#### Vanilla JavaScript
Just add the `i18n.js` file to your page. You'll have to build the translations object
by hand or using your favorite programming language. More info below.
#### Via NPM with webpack and CommonJS
Add the following line to your package.json dependencies (where version is the version you want - n.b. npm install requires it to be the gzipped tarball, see [npm install](https://www.npmjs.org/doc/cli/npm-install.html))
```javascript
-"i18n-js": "http://github.com/fnando/i18n-js/archive/v3.0.0.rc8.tar.gz"
+"i18n-js": "http://github.com/fnando/i18n-js/archive/v3.0.0.rc12.tar.gz"
```
Run npm install then use via
```javascript
var i18n = require("i18n-js");
```