i18n-calypso-mixin
v0.0.9React Mixin for i18n-calypso
Usage
import i18nMixin from 'i18n-calypso-mixin';
const MyComponent = React.createClass( {
mixins: [ i18nMixin ],
render: function() {
return (
<p>{ this.translate( 'Hello World' ) }</p>
);
}
} );
Or inject it in all your components using:
ReactInjection.Class.injectMixin( i18nMixin );
For more information on how to configure i18n for your project using i18n-calypso
,
please refer to i18n-calypso's README.
npm i i18n-calypso-mixin
Metadata
- GPL-2.0
- Whatever
- @automattic
- released 5/19/2016