Skip to content

Commit

Permalink
Added some light install help for locales
Browse files Browse the repository at this point in the history
  • Loading branch information
SlexAxton committed Feb 27, 2012
1 parent c194f01 commit fa6ada9
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions README.md
Expand Up @@ -76,7 +76,7 @@ There is very little that needs to be repeated (until gender modifies more than
## Install

### Node
```
```javascript
> npm install messageformat

var MessageFormat = require('messageformat');
Expand All @@ -88,15 +88,20 @@ var MessageFormat = require('messageformat');
```

### Adding Provided Locales
```
```html
<!-- after the messageformat.js include, but before you need to use the locale -->
<script src="/path/to/messageformat/locales/xx_xx.js"></script>
```

TODO:: In node, we can automatically pull in all known locales for you.

### Adding Custom locales
```javascript
// Any time after MessageFormat is included
MessageFormat.locale["locale_name"] =
MessageFormat.locale["locale_name"] = function () { ... };

// Or during instantiation
var mf = new MessageFormat( 'locale_name', function () { ... } );
```

## Why not Gettext?
Expand Down

0 comments on commit fa6ada9

Please sign in to comment.