dolibarr-dev
[Top][All Lists]
Advanced

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

Re: [Dolibarr-dev] Language terms duplication


From: Laurent Destailleur (aka Eldy)
Subject: Re: [Dolibarr-dev] Language terms duplication
Date: Wed, 15 Jul 2015 12:29:39 +0200

Having one language file will not increase performance.
It is even the opposite. 

We introduced several files because, few year ago, we have only one file. And 60% of loading a page was spent by loading language files. By using several language files, performance of dolibarr was better by a factor x2 because we only load IO an memory of what we need.

Dealing with several files is not so hard. You must only know this rule:
- The main.lang file is always loaded and contains very common strings
- For installer process, we must load language file "install.lang"
- For all admin pages (pages used by admin user only), we must load language files "admin.lang"
- All other files depends on module the feature you are working on need. If you work on something depening on thirdparty and invoice, you must load page for thirdparty (called companies.lang) and invoice (called bills.lang). Loading more is not a problem, but it decrease performance.

A tool was built to fight/delete duplicate keys. Tool is into the dev directory. I didn't use it yet but it is planned for 3.9.













2015-07-14 22:26 GMT+02:00 Lorenzo Novaro <address@hidden>:
Hi Yannick,
during last devcamp my colleague Tommaso developed a tool to check
duplicate and unused language keys in localization files.
It's dev/translation/sanity_check_en_langfiles.php .
If I recall well, we fixed all duplicates in en_US files during the
devcamp.

That said, I kind of agree with you: If we want performance and
consistency, we should use a single file (and include comments when
clarity is needed, maybe); if we believe that multiple files are easier
to manage and translate, then we should keep them tidy and, possibly,
not as big as some of them are now (admin.lang seems an obvious
example).

Lorenzo Novaro
--
Diciannove Soc. Coop.
http://19.coop
http://diciannove.tel

GENOVA  Via Luccoli, 14/8 - 16123
tel. +39 0109980020 - fax +39 0109980021

PARMA   Strada Buffolara 26/A - 43126
tel. +39 05211841134 - fax +39 0109980021

_______________________________________________
Dolibarr-dev mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/dolibarr-dev



--
EMail: address@hidden
Web: http://www.destailleur.fr
------------------------------------------------------------------------------------
Google+: https://plus.google.com/+LaurentDestailleur/
Facebook: https://www.facebook.com/Destailleur.Laurent
Twitter: http://www.twitter.com/eldy10
------------------------------------------------------------------------------------
* Dolibarr (Project leader): http://www.dolibarr.org (make a donation for Dolibarr project via Paypal: address@hidden)
* AWStats (Author) : http://awstats.sourceforge.net (make a donation for AWStats project via Paypal: address@hidden)
* AWBot (Author) : http://awbot.sourceforge.net
* CVSChangeLogBuilder (Author) : http://cvschangelogb.sourceforge.net



reply via email to

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