Skip to content

Instantly share code, notes, and snippets.

@ryandrewjohnson
Last active July 1, 2018 00:54
Show Gist options
  • Select an option

  • Save ryandrewjohnson/342634672c36cb1cb7253deb7c2ab86e to your computer and use it in GitHub Desktop.

Select an option

Save ryandrewjohnson/342634672c36cb1cb7253deb7c2ab86e to your computer and use it in GitHub Desktop.
react-localize-redux - addTranslations.js
import React from "react";
import { withLocalize } from "react-localize-redux";
import movieTranslations from "./translations/movies.json";
class Movies extends React.Component {
constructor(props) {
super(props);
this.props.addTranslation(movieTranslations);
}
render() {
// render movie component
}
}
export default withLocalize(Movies);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment