CodeIgniter reusable message library

北城以北 提交于 2019-12-04 20:54:31

CodeIgniter's language class is what you're looking for: CI Language Class

$this->message->set('error',$this->lang->line('error.login'));

A config file is more or less how you'd want to do it. It is simple, clear and light. But just because you are keeping it in a config file, that does not mean you need to keep it in config.php. The Config class allows you to have multiple config files, so have a special one for messages. Heck, you could even have several special ones for languages, and leave the one you are looking for in the config.php file!

 $this->config->load( $this->config->get( "language_file_name" ) );
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!