react-redux-i18n switch lang
<p>I followed the readme file on this library: <a href="https://www.npmjs.com/package/react-redux-i18n" rel="nofollow noreferrer">url</a>.
Everything went fine except for a thing: how the heck can I switch the language from inside, for example, my  component?</p>

<p>I've tried to use an action inside my NavBar component but it returns me "this.props.dispatch" is not a function in the console.</p>

<p>This is my component:</p>



<pre class="lang-jsx prettyprint-override"><code>import React from 'react';
import { Link } from 'react-router';
import { connect } from 'react-redux';
import { logout } from '../actions/authActions';

import { Translate, Localize } from 'react-redux-i18n';
import { loadTranslations, setLocale, syncTranslationWithStore } from 'react-redux-i18n';

class NavigationBar extends React.Component {
    constructor(props){
        super(props);

        this.changeLang = this.changeLang.bind(this);
    }

    logout(e) {
        e.preventDefault();
        this.props.logout();
    }

    changeLang(){
        this.props.dispatch(setLocale('nl'));
    }

    render() {
        const { isAuthenticated } = this.props.auth;
        const userLinks =  (
            &lt;a href="#" onClick={ this.logout.bind(this) }&gt;Logout&lt;/a&gt;
        );

        const guestLinks =  (
            &lt;div&gt;
                &lt;Link to="/signup"&gt;Signup&lt;/Link&gt;
                &lt;Link to="/login"&gt;Login&lt;/Link&gt;
            &lt;/div&gt;
        );

        return (
            &lt;div&gt;
                { isAuthenticated ? userLinks: guestLinks }
                &lt;Translate value="application.title"/&gt;
                &lt;br /&gt;
                &lt;a href="#" onClick={this.changeLang}&gt;NL&lt;/a&gt;
            &lt;/div&gt;
        );
    }
}

NavigationBar.propTypes = {
    auth: React.PropTypes.object.isRequired,
    logout: React.PropTypes.func.isRequired
}

function mapStateToProps(state){
    return {
        auth: state.auth
    };
}

export default connect(mapStateToProps, { logout })(NavigationBar);
</code></pre>