title: How to change the page language without refresh in MVC model?
body: <p>In the <code>settings.php</code> i have some input for the realname,hobby,city and select tag for the languages </p>
  
  <p>The html form is easy and i'm not going to copy it :) </p>
  
  <p>This is the php code for the form</p>
  
  <pre><code>&lt;?php
  if(isset($_POST['submit'])){
  
  
    if($this-&gt;edit-&gt;process()){
      $s = 1; 
    }
  
  }
  
  if($s){echo '&lt;p id="success"&gt;Success&lt;/p&gt;';}
  </code></pre>
  
  <p>?></p>
  
  <p>This is in the view file and when the form is submit the $this->edit = the model for the updating the user data.</p>
  
  <p>Everything work really good but in head.php there is this code</p>
  
  <p><code>&lt;?php $lang = $this-&gt;lange('global',$this-&gt;getUser-&gt;language($_SESSION['userID']));</code>?></p>
  
  <p>With him this get the user current language and after that load the file with lange()</p>
  
  <p>So if the submit is like this,the inputs and select tag are changing with what the user have choicen but the to see the new  language they have to refresh the page. This is not good,because the user may be confuced that they did something wrong. </p>
  
  <p>But if the form with method="POST" the page is refreshing and still with the old language</p>