Why not putting the
ModuleNNNName
into you own module language file. This avoid to edit admin.lang and
allow your module to bring its own translation of its name.
Le 03/05/2012 18:50, Philippe Gerland a écrit :
Module name/description specified in module descriptor
(modMyModule.class.php) is currently not localized (unless you use the
ModuleNNNName/Module inside generic admin.lang).
In order to allow use of module langs definition, only a small change
would be required, as the module langs file is already loaded :
DolibarrModules.class.php :
function getName
Line 238 :
replace "return $this->name;" by "return $langs->trans($this->name);"
function getDesc
Line 262 :
replace "return $this->description;" by "return
$langs->trans($this->description);"
With this change, you just need to put the keys towards your module
lang files inside your modMyModule.class.php.
$this->name = 'KeyModuleName';
$this->description = 'KeyModuleDescription';
$this->langfiles = array("ofx@ofx")
_______________________________________________
Dolibarr-dev mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/dolibarr-dev
--
Eldy (Laurent Destailleur).
---------------------------------------------------------------
EMail: [email protected]
Web: http://www.destailleur.fr
Dolibarr (Project leader): http://www.dolibarr.org
To make a donation for Dolibarr project via Paypal: [email protected]
AWStats (Author) : http://awstats.sourceforge.net
To make a donation for AWStats project via Paypal: [email protected]
AWBot (Author) : http://awbot.sourceforge.net
CVSChangeLogBuilder (Author) : http://cvschangelogb.sourceforge.net
_______________________________________________
Dolibarr-dev mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/dolibarr-dev