react-translate-connector

1.0.1 • Public • Published

react-translate-connector

NPM JavaScript Style Guide

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

Readme

Keywords

none

Package Sidebar

Install

npm i react-translate-connector

Weekly Downloads

0

Version

1.0.1

License

MIT

Unpacked Size

12.2 kB

Total Files

6

Last publish

Collaborators

  • ebejan