php - Codeigniter + HMVC is only requesting login_lang file ... all other module's lang files are not being loaded -
i made copy of working application, made changes modules @ point noticed language files not being loaded.
for example, @ login (myapp/login), file login_lang.php requested, , if not present (i renamed file not find it) error thrown.
other modules within app (myapp/dashboard)
don't request corresponding language file (dashboard_lang.php)
again, if rename login_lang.php
other name, module throw "login_lang.php file not found"
error.
i think modules requesting first file (login_lang.php
)
i've gone thru lot of forums, questions, etc. unsuccessfully.
any ideas of causing behavior?
thanks in advance.
this autoload.php file contents:
----- begin of file ------
<?php if ( ! defined('basepath')) exit('no direct script access allowed'); /* | ------------------------------------------------------------------- | auto-loader | ------------------------------------------------------------------- | file specifies systems should loaded default. | | in order keep framework light-weight possible | absolute minimal resources loaded default. example, | database not connected automatically since no assumption | made regarding whether intend use it. file lets | globally define systems loaded every | request. | | ------------------------------------------------------------------- | instructions | ------------------------------------------------------------------- | | these things can load automatically: | | 1. packages | 2. libraries | 3. helper files | 4. custom config files | 5. language files | 6. models | */ /* | ------------------------------------------------------------------- | auto-load packges | ------------------------------------------------------------------- | prototype: | | $autoload['packages'] = array(apppath.'third_party', '/usr/local/shared'); | */ $autoload['packages'] = array(apppath.'third_party'); /* | ------------------------------------------------------------------- | auto-load libraries | ------------------------------------------------------------------- | these classes located in system/libraries folder | or in application/libraries folder. | | prototype: | | $autoload['libraries'] = array('database', 'session', 'xmlrpc'); */ $autoload['libraries'] = array('database','session'); /* | ------------------------------------------------------------------- | auto-load helper files | ------------------------------------------------------------------- | prototype: | | $autoload['helper'] = array('url', 'file'); */ $autoload['helper'] = array('url','html'); /* | ------------------------------------------------------------------- | auto-load config files | ------------------------------------------------------------------- | prototype: | | $autoload['config'] = array('config1', 'config2'); | | note: item intended use if have created custom | config files. otherwise, leave blank. | */ $autoload['config'] = array(); /* | ------------------------------------------------------------------- | auto-load language files | ------------------------------------------------------------------- | prototype: | | $autoload['language'] = array('lang1', 'lang2'); | | note: not include "_lang" part of file. example | "codeigniter_lang.php" referenced array('codeigniter'); | */ $autoload['language'] = array(); /* | ------------------------------------------------------------------- | auto-load models | ------------------------------------------------------------------- | prototype: | | $autoload['model'] = array('model1', 'model2'); | */ $autoload['model'] = array(); /* end of file autoload.php */ /* location: ./application/config/autoload.php */
----- end of file --------
in language put module name first. can create language folder inside module lets modules => admin => language => en
modules => admin => language => en => dashboard_lang.php
$autoload['language'] = array('admin/dashboard');
or on controller
modules => admin => language => en => dashboard_lang.php
$this->lang->load('admin/dashboard', 'english');
with sub folder
modules => admin => language => en => common => dashboard_lang.php
$autoload['language'] = array('admin/common/dashboard');
or on controller
modules => admin => language => en => common => dashboard_lang.php
$this->lang->load('admin/common/dashboard', 'english');