codeigniter change language form_validation_lang

前端 未结 1 1793
青春惊慌失措
青春惊慌失措 2020-12-21 13:45

I try to change the language file for my form_validation_lang in my LanguageLoader.php in my hooks folder like this:

class LanguageLoader
{
    function init         


        
相关标签:
1条回答
  • 2020-12-21 14:32

    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); 
    
    0 讨论(0)
提交回复
热议问题