1.0.1 • Published 6 years ago
react-translate-connector v1.0.1
react-translate-connector
Install
npm install --save react-translate-connector
Usage
import React, { Component } from 'react'
import connectProvider from 'react-translate-connector';
class Header extends React.Component {
render(){
return(
<div>
<button onClick={() => this.props.changeLang('en')}>EN</button>
<button onClick={() => this.props.changeLang('es')}>ES</button>
</div>
)
}
}
export default connectProvider(Header);
Props
Name | Type | Param | Description |
---|---|---|---|
changeLang | Function | Language key | Change the current language |
language | Object | void | Object that contains the language keys |
License
MIT © eugeni9872