I had written language constants of D3 modules can be override by putting files under XOOPS_ROOT_PATH/modules/(dirname)/langauge/ from XOOPS_TRUST_PATH/modules/(trustdirname)/language/
But I found it is hard to use. (eg. Newly appended constants can be displayed its name instead of its value)
And I think CMS should be change its language constants not only via FTP but also "control panel".
Then, I've just implemented Language constants overriding system into altsys-0.5.
- mylangadmin
A controller called by each module's admin area. (like myblocksadmin or mytplsadmin)
This controller saves user values into DB(altsys_language_constants), then makes a cache file under XOOPS_ROOT_PATH/cache/
- D3LanguageManager
A singleton class for module/core on including language constants.
This class can be used like...
require_once XOOPS_TRUST_PATH.'/libs/altsys/class/D3LanguageManager.class.php' ;
$langman =& D3LanguageManager::getInstance() ;
$langman->read( 'main.php' , $mydirname , $mytrustdirname ) ;
the user could also save the new Values in a copy of the original file?