PEAK XOOPS - D3 - spec of language (1) in englishin japanese

Archive | RSS |
XOOPS
XOOPS : D3 - spec of language (1)
Poster : GIJOE on 2006-10-01 16:47:51 (8955 reads)

in englishin japanese
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.'_...') ;
	...


0 comments

Related articles
Printer friendly page Send this story to a friend

Comments list

Login
Username or e-mail:

Password:

Remember Me

Lost Password?

Register now!