# react-frau-intl
[![NPM version][npm-image]][npm-url]
[![Build status][ci-image]][ci-url]
[![Coverage Status][coverage-image]][coverage-url]
[![Dependency Status][dependencies-image]][dependencies-url]

A simple React mixin for getting localized text in components.



[npm-url]: https://www.npmjs.org/package/react-frau-intl
[npm-image]: https://badge.fury.io/js/react-frau-intl.png
[ci-image]: https://travis-ci.org/Brightspace/react-frau-intl.svg?branch=master
[ci-url]: https://travis-ci.org/Brightspace/react-frau-intl
[coverage-image]: https://coveralls.io/repos/Brightspace/react-frau-intl/badge.png?branch=master
[coverage-url]: https://coveralls.io/r/Brightspace/react-frau-intl?branch=master
[dependencies-url]: https://david-dm.org/brightspace/react-frau-intl
[dependencies-image]: https://david-dm.org/brightspace/react-frau-intl.png

# react-frau-intl
[![NPM version][npm-image]][npm-url]
[![Build status][ci-image]][ci-url]
[![Coverage Status][coverage-image]][coverage-url]
[![Dependency Status][dependencies-image]][dependencies-url]

A simple React mixin for getting localized text in components without dependency on Intl or requiring loading additional locale data.

## Installation

Install from NPM:
```shell
npm install react-frau-intl
```

## Usage

Given locale text data such as:
```javascript
{
     "MyComponent": {
          "Message": "this message"
     }
}
```

Assign messages JSON to React component, for example:

```javascript
<MyComponent messages={messages}/>
```

In component, wire up the mixin if necessary and consume:

```javascript
var ReactIntlMixin = require('react-frau-intl');

var MyComponent = React.createClass({
     mixins: [ReactIntlMixin],
     render: function() {
          return <span>{this.getIntlMessage('MyComponent.Message')}</span>;
     }
});
```

[npm-url]: https://www.npmjs.org/package/react-frau-intl
[npm-image]: https://badge.fury.io/js/react-frau-intl.png
[ci-image]: https://travis-ci.org/Brightspace/react-frau-intl.svg?branch=master
[ci-url]: https://travis-ci.org/Brightspace/react-frau-intl
[coverage-image]: https://coveralls.io/repos/Brightspace/react-frau-intl/badge.png?branch=master
[coverage-url]: https://coveralls.io/r/Brightspace/react-frau-intl?branch=master
[dependencies-url]: https://david-dm.org/brightspace/react-frau-intl
[dependencies-image]: https://david-dm.org/brightspace/react-frau-intl.png

Update with readme with some info.
Update with readme with some info.
