title: codeigniter multilingual form_validation_lang.php
body: <p>I am trying to make a multilingual site with Codeigniter, and for the content this works fine by loading the <code>_lang.php</code> file from the right language folder dynamically from the controller. It's just that I don't get how to do this with the  <code>form_validation_lang.php file</code>.  </p>
  
  <p>Is there a way to set what folder it should take the <code>_lang.php</code> files from the controller? </p>
  
  <p>Here is what I used, leaving most set_rules() lines out. </p>
  
  <pre><code>  $this-&gt;lang-&gt;load('MY_register_lang', $this-&gt;_language);
    $this-&gt;load-&gt;library('form_validation');
    $this-&gt;lang-&gt;load('form_validation', $this-&gt;_language);
  
    $this-&gt;form_validation-&gt;set_rules('username', 'lang:un', 'trim|required|min_length[3]|max_length[25]|alpha_dash|is_unique[user.username]');
    $this-&gt;form_validation-&gt;set_rules('pass2', 'lang:pass2', 'trim|required|matches[pass1]');
    $this-&gt;form_validation-&gt;set_message('matches', $this-&gt;lang-&gt;line('no_match')); 
  </code></pre>
  
  <p>It does load the right MY_register_lang.php, but not the form_validation_lang.php (yes, tried adding the _lang). it does use the right language from the set_message() method, but that comes from the file that does get loaded.</p>