ember-cli-i18n
Advanced tools
Comparing version 0.0.1 to 0.0.2
import Ember from 'ember'; | ||
import t from 'ember-cli-i18n/helpers/t'; | ||
import t from 'ember-cli-i18n/utils/t'; | ||
export default Ember.Handlebars.makeBoundHelper(t); |
{ | ||
"name": "ember-cli-i18n", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": "Simple Internationalization support for ember-cli apps.", | ||
@@ -5,0 +5,0 @@ "directories": { |
@@ -40,6 +40,6 @@ # Ember CLI i18n | ||
The file will be added to `app/locales' | ||
The file will be added to `app/locales` | ||
``` | ||
app/ | ||
app | ||
└── locales | ||
@@ -49,3 +49,3 @@ └── en.js | ||
The content export a single POJO: | ||
Then export a single POJO: | ||
@@ -71,3 +71,3 @@ ```javascript | ||
The rules for interpolation follow the same from | ||
`[Ember.String.fmt](http://emberjs.com/api/classes/Ember.String.html#method_fmt)` | ||
[`Ember.String.fmt`](http://emberjs.com/api/classes/Ember.String.html#method_fmt) | ||
@@ -94,2 +94,17 @@ #### Helper | ||
#### Utility | ||
The `t` function can be used outside of templates as a utility function: | ||
```javascript | ||
import Ember from 'ember'; | ||
import t from 'ember-cli-i18n'; | ||
export default Ember.Object.extend({ | ||
foo: function() { | ||
return t('foo.bar'); | ||
} | ||
}); | ||
``` | ||
## Authors ## | ||
@@ -96,0 +111,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
17572
129