dolibarr-dev
[Top][All Lists]
Advanced

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

Re: [Dolibarr-dev] Small Localization enhancement DolibarrModules.class.


From: Régis Houssin
Subject: Re: [Dolibarr-dev] Small Localization enhancement DolibarrModules.class.php
Date: Thu, 03 May 2012 19:02:50 +0200
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:12.0) Gecko/20120428 Thunderbird/12.0.1

hi

there is already a translation system that is based on the module
number, simply add this to the language file (eg unit number 4500)

Module4500Name =
Module4500Desc =

if this is not present in the language files, dolibarr use values ​​
defined in the descriptor of the module.


Le 03/05/12 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("address@hidden")
> 
> 
> 
> _______________________________________________
> Dolibarr-dev mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/dolibarr-dev

Cordialement,
-- 
Régis Houssin
---------------------------------------------------------
Cap-Networks
Cidex 1130
34, route de Gigny
71240 MARNAY
FRANCE
VoIP: +33 1 83 62 40 03
GSM: +33 6 33 02 07 97
Web: http://www.cap-networks.com/
Email: address@hidden

Dolibarr developer: address@hidden
Web Portal: http://www.dolibarr.fr/
SaaS offers: http://www.dolibox.fr/
Shop: http://www.dolistore.com/
Development platform: https://doliforge.org/
---------------------------------------------------------



reply via email to

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