i18n-calypso-mixin

v0.0.8
React Mixin for i18n-calypso

React 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.

Metadata

  • GPL-2.0
  • Whatever
  • @automattic
  • released 5/19/2016

Downloads

Maintainers