How to Load the Requested Language File: Language/En/Form_Validation_Lang.Php

Unable to load the requested language file: language/en/form_validation_lang.php

CI form_validation library uses language file for display error message.You are using required valid_email those error message is written inside form_validation_lang.php.

form_validation library loads the language file(form_validation_lang.php) itself whether you load or not.You can open the library file and look at the run function you will see a line $this->CI->lang->load('form_validation');

This file located either inside your system/language/your_language/ or application/language/your_language/.

That error message says you missed the file inside any of the folder.If you download the original CI files it should be inside system/language/english/ folder.If you don't see the file download CI and restore the file there.

codeigniter change language form_validation_lang

Error messages for form_validation are always loaded in language you set in your config.php. To change the language for your form_validation messages, you need to do a little trick, changing the default language like this:

$ci->config->set_item('language', $siteLang); 

How to load language file in Cor library from module language files in codeigniter

You can do like this:

$module = 'customers';
$module_path = APPPATH . 'modules/' . $module . '/';
$this->lang->load('back', 'arabic', false, true, $module_path);

And also you need to put your module language file in:

application/modules/customers/language/arabic/back_lang.php



Related Topics



Leave a reply



Submit