title: Replace different html-text with javascript for translating page
body: <p>I have a multilingual WordPress website with a field that is generated with <code>ACF-Field</code>. <code>WPML</code> is not able to translate it (2nd-level-support is working on it). So I was thinking to let JavaScript translate the different Text-Fields, but I can not manage it.</p>
  
  <p>What I would like to do:</p>
  
  <p>if the url-slug contains <code>/fr</code> then
  translate
  Präsident into président
  Berater into consultant
  Sekretär into secrétaire</p>
  
  <p>if the url-slug contains <code>/it</code> then
  translate
  Präsident into presidente
  Berater into 
  consulente
  Sekretär into secretario</p>
  
  <p>What is the easiest way to achieve this?</p>
  
  <p>I already got some results but only for one text-variable</p>
  
  <pre><code>var src_str = ("Präsident");
  var str_repFRp = src_str.replace("Präsident","président");
  
  $url = $_SERVER["REQUEST_URI"];
  
  $isItFrench = strpos($url, '/fr');
  
  if ($isItFrench!==false)
  {
  document.getElementById("p1").innerHTML = str_repFRp;
  }
  </code></pre>