[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Dolibarr-dev] Small Localization enhancement DolibarrModules.class.php

From: Philippe Gerland
Subject: [Dolibarr-dev] Small Localization enhancement DolibarrModules.class.php
Date: Thu, 3 May 2012 18:50:17 +0200

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("address@hidden")

reply via email to

[Prev in Thread] Current Thread [Next in Thread]