# react-translate-component **Repository Path**: mirrors_svenanders/react-translate-component ## Basic Information - **Project Name**: react-translate-component - **Description**: A component for React that utilizes the Counterpart module to provide multi-lingual/localized text content. - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-08-18 - **Last Updated**: 2026-04-25 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # React Translate Component Translate is a component for [React][1] that utilizes the [Counterpart module][2] and the [Interpolate component][3] to provide multi-lingual/localized text content. It allows switching locales without a page reload. ## Installation Install via npm: ```bash % npm install react-translate-component ``` ## Usage Here is a quick-start tutorial to get you up and running with Translate. It's a step-by-step guide on how to build a simple app that uses the Translate component from scratch. We assume you have recent versions of [Node.js][5] and [npm][6] installed. First, let's create a new project: ```bash $ mkdir translate-example $ cd translate-example $ touch client.js $ npm init # accept all defaults here ``` Next, add a dependency to our Translate component: ```bash $ npm install react-translate-component --save ``` This also installs React and Counterpart because these are configured as a peer dependencies. We will put our application logic into `client.js`. Open the file in your favorite editor and add the following lines: ```js 'use strict'; var counterpart = require('counterpart'); var React = require('react'); var Translate = require('react-translate-component'); ``` This loads the localization library, React and our Translate component. Let's write our entry-point React component. Add the following code to the file: ```jsx var MyApp = React.createClass({ render: function() { return ( React Translate Quick-Start