Here is the spec for language files of D3 modules.
XOOPS_TRUST_PATH/modules/(trustdirname)/language/(lang)/modinfo.php
$constpref = '_MI_' . strtoupper( $mydirname ) ;
if( ! defined( $constpref.'_LOADED' ) ) {
// a flag for this language file has already been read or not.
define( $constpref.'_LOADED' , 1 ) ;
define($constpref."_NAME","(name of the module)");
define($constpref."_DESC","(desc of the module)");
}
Usage (eg. xoops_version.php)
$modversion['name'] = constant($constpref.'_NAME') ;
$modversion['description'] = constant($constpref.'_DESC') ;
XOOPS_TRUST_PATH/modules/(trustdirname)/language/(lang)/admin.php
define( '_MD_A_(TRUSTDIRNMAE)_...' , '...' ) ;
...
XOOPS_TRUST_PATH/modules/(trustdirname)/language/(lang)/main.php
define( '_MD_(TRUSTDIRNMAE)_...' , '...' ) ;
...
XOOPS_TRUST_PATH/modules/(trustdirname)/language/(lang)/blocks_common.php
define( '_MB_(TRUSTDIRNAME)_...' , '...' ) ;
...
XOOPS_TRUST_PATH/modules/(trustdirname)/language/(lang)/blocks_each.php
$constpref = '_MB_' . strtoupper( $mydirname ) ;
if( ! defined( $constpref.'_LOADED' ) ) {
// a flag for this language file has already been read or not.
define( $constpref.'_LOADED' , 1 ) ;
define($constpref."_...","...");
...
}
Usage (eg. show func in blocks/block_functions.php)
$block['lang_...'] = constant($constpref.'_...') ;
...
|