title: How to implement localization in reactjs?
body: <blockquote>
    <p>We need to implement the localization in reactjs to define the string
    value(s). How can I implement that?</p>
  </blockquote>
  
  <p>One link is there <a href="https://www.npmjs.com/package/react-localization" rel="noreferrer">https://www.npmjs.com/package/react-localization</a>, but I am not getting the correct steps to add that.</p>
  
  <p>I have tried by following steps:</p>
  
  <ol>
  <li>I am adding my component in ES6:</li>
  </ol>
  
  <pre><code>    class Home extends React.Component
      {
          constructor(props) {
              super(props);
          }
          render() {
              return (
                &lt;Text&gt;{strings.how}&lt;/Text&gt;
               );
          }
      }
  
  </code></pre>
  
  <ol start="2">
  <li>I have added the localization code as:-</li>
  </ol>
  
  <pre><code>    import LocalizedStrings from 'react-localization';
      let strings = new LocalizedStrings({
          en:{
              how:"How do you want your egg today?",
              boiledEgg:"Boiled egg",
              softBoiledEgg:"Soft-boiled egg",
              choice:"How to choose the egg"
          },
          it: {
              how:"Come vuoi il tuo uovo oggi?",
              boiledEgg:"Uovo sodo",
              softBoiledEgg:"Uovo alla coque",
              choice:"Come scegliere l'uovo"
          }
      });
  </code></pre>
  
  <blockquote>
    <p>Now if you will see above :-  <strong>{strings.how}</strong> I should able
    to get the strings value as it is defined in localization but I am not
    able to do it.</p>
  </blockquote>