Skip to content

Commit

Permalink
added docs
Browse files Browse the repository at this point in the history
  • Loading branch information
viktor committed Oct 7, 2016
1 parent dccb3b3 commit 73b7ded
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions docs/pluralize-helper.md
@@ -0,0 +1,24 @@
# Pluralize Helper

Orchestra provides a helper to pluralize words when appropriate.

In order to make it work you need to have a singular and plural strings defined in your locale
```js
var enGB = {
'en-GB': {
'translation': {
'day': 'day',
'day_plural': 'days'
}
}
};
```

You would use this helper in your handlebars template like so:
```js

{{pluralize "day" 0}} // renders 'days'
{{pluralize "day" 1}} // renders 'day'
{{pluralize "day"}} // renders 'day' (default behaviour)

```

0 comments on commit 73b7ded

Please sign in to comment.