title: jQuery language switcher
body: <p>I want to build a website having its content in two languages. I want to use jQuery for the language switching. My idea is this: </p>
  
  <p>instead of having actual content in the HTML page:</p>
  
  <pre><code>&lt;div&gt;Hello there&lt;/div&gt;
  </code></pre>
  
  <p>I want to use classes:</p>
  
  <p>HTML:</p>
  
  <pre><code>&lt;div class="hello_EN"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>JS(I'm not good at JS; i've combined it with some PHP so I can make myself understood):</p>
  
  <pre><code>var EN = new array('hello_EN' =&gt; 'Hello there');
  foreach($EN as $class =&gt; $content)
  $(".$class").text("$content"); //this should populate all my HTML classes with its content
  </code></pre>
  
  <p>Then, I must have my second language array:</p>
  
  <pre><code>var RO = new array('hello_RO' =&gt; 'Salut');
  </code></pre>
  
  <p>Now, the switching:</p>
  
  <pre><code>$("#change_to_RO").click(function() {
         $(EN).replaceWith(RO);
  });
  </code></pre>
  
  <p>How should I approach this? 
  Thanks.</p>