diff --git a/htdocs/compta/charges/index.php b/htdocs/compta/charges/index.php index 7a11a709128..90d4aed021f 100644 --- a/htdocs/compta/charges/index.php +++ b/htdocs/compta/charges/index.php @@ -34,8 +34,8 @@ require_once DOL_DOCUMENT_ROOT.'/compta/salaries/class/paymentsalary.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; -$langs->load("compta"); -$langs->load("bills"); +// Load translation files required by the page +$langs->loadLangs(array('compta', 'bills')); // Security check if ($user->societe_id) $socid=$user->societe_id; diff --git a/htdocs/compta/clients.php b/htdocs/compta/clients.php index c65a7a670ae..aba6460d8e2 100644 --- a/htdocs/compta/clients.php +++ b/htdocs/compta/clients.php @@ -39,7 +39,7 @@ if ($user->societe_id > 0) if (! $user->rights->facture->lire) accessforbidden(); - +// Load translation files required by the page $langs->load("companies"); $mode=GETPOST("mode"); diff --git a/htdocs/compta/deplacement/card.php b/htdocs/compta/deplacement/card.php index 979ef5960e0..05d509e268d 100644 --- a/htdocs/compta/deplacement/card.php +++ b/htdocs/compta/deplacement/card.php @@ -33,6 +33,7 @@ if (! empty($conf->projet->enabled)) require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; } +// Load translation files required by the page $langs->load("trips"); diff --git a/htdocs/compta/deplacement/document.php b/htdocs/compta/deplacement/document.php index 76481c4c8c0..59d92140c86 100644 --- a/htdocs/compta/deplacement/document.php +++ b/htdocs/compta/deplacement/document.php @@ -34,10 +34,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/trip.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; -$langs->load("other"); -$langs->load("trips"); -$langs->load("companies"); -$langs->load("interventions"); +// Load translation files required by the page +$langs->loadLangs(array('other', 'trips', 'companies', 'interventions')); $id = GETPOST('id','int'); $ref = GETPOST('ref', 'alpha'); diff --git a/htdocs/compta/deplacement/index.php b/htdocs/compta/deplacement/index.php index 64c5442299f..a390023e280 100644 --- a/htdocs/compta/deplacement/index.php +++ b/htdocs/compta/deplacement/index.php @@ -27,9 +27,8 @@ require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/compta/tva/class/tva.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/deplacement/class/deplacement.class.php'; -$langs->load("companies"); -$langs->load("users"); -$langs->load("trips"); +// Load translation files required by the page +$langs->loadLangs(array('companies', 'users', 'trips')); // Security check $socid = GETPOST('socid','int'); diff --git a/htdocs/compta/deplacement/info.php b/htdocs/compta/deplacement/info.php index 1e0279263e3..6a62484323f 100644 --- a/htdocs/compta/deplacement/info.php +++ b/htdocs/compta/deplacement/info.php @@ -27,6 +27,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/trip.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; require_once DOL_DOCUMENT_ROOT.'/compta/deplacement/class/deplacement.class.php'; +// Load translation files required by the page $langs->load("trips"); // Security check diff --git a/htdocs/compta/deplacement/list.php b/htdocs/compta/deplacement/list.php index fad8d93b244..606e79b311c 100644 --- a/htdocs/compta/deplacement/list.php +++ b/htdocs/compta/deplacement/list.php @@ -30,9 +30,8 @@ require_once DOL_DOCUMENT_ROOT.'/compta/deplacement/class/deplacement.class.php' require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; -$langs->load("companies"); -$langs->load("users"); -$langs->load("trips"); +// Load translation files required by the page +$langs->loadLangs(array('companies', 'users', 'trips')); // Security check $socid = GETPOST('socid','int'); diff --git a/htdocs/compta/deplacement/stats/index.php b/htdocs/compta/deplacement/stats/index.php index d503d5e4c07..cf652948a6e 100644 --- a/htdocs/compta/deplacement/stats/index.php +++ b/htdocs/compta/deplacement/stats/index.php @@ -27,8 +27,8 @@ require '../../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/deplacement/class/deplacementstats.class.php'; -$langs->load("trips"); -$langs->load("companies"); +// Load translation files required by the page +$langs->loadLangs(array('trips', 'companies')); $WIDTH=DolGraph::getDefaultGraphSizeForStats('width'); $HEIGHT=DolGraph::getDefaultGraphSizeForStats('height'); diff --git a/htdocs/compta/facture/admin/facture_cust_extrafields.php b/htdocs/compta/facture/admin/facture_cust_extrafields.php index 7e6b069b0d9..2c676e399de 100644 --- a/htdocs/compta/facture/admin/facture_cust_extrafields.php +++ b/htdocs/compta/facture/admin/facture_cust_extrafields.php @@ -29,9 +29,8 @@ require '../../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/invoice.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; -$langs->load("companies"); -$langs->load("admin"); -$langs->load("bills"); +// Load translation files required by the page +$langs->loadLangs(array('companies', 'admin', 'bills')); $extrafields = new ExtraFields($db); $form = new Form($db); diff --git a/htdocs/compta/facture/admin/facture_rec_cust_extrafields.php b/htdocs/compta/facture/admin/facture_rec_cust_extrafields.php index 76284e7fe73..18aa3c99442 100644 --- a/htdocs/compta/facture/admin/facture_rec_cust_extrafields.php +++ b/htdocs/compta/facture/admin/facture_rec_cust_extrafields.php @@ -30,9 +30,8 @@ require '../../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/invoice.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; -$langs->load("companies"); -$langs->load("admin"); -$langs->load("bills"); +// Load translation files required by the page +$langs->loadLangs(array('companies', 'admin', 'bills')); $extrafields = new ExtraFields($db); $form = new Form($db); diff --git a/htdocs/compta/facture/admin/facturedet_cust_extrafields.php b/htdocs/compta/facture/admin/facturedet_cust_extrafields.php index d42139e4ec0..2b90ae7fe05 100644 --- a/htdocs/compta/facture/admin/facturedet_cust_extrafields.php +++ b/htdocs/compta/facture/admin/facturedet_cust_extrafields.php @@ -30,9 +30,8 @@ require '../../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/invoice.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; -$langs->load("companies"); -$langs->load("admin"); -$langs->load("bills"); +// Load translation files required by the page +$langs->loadLangs(array('companies', 'admin', 'bills')); $extrafields = new ExtraFields($db); $form = new Form($db); diff --git a/htdocs/compta/facture/admin/facturedet_rec_cust_extrafields.php b/htdocs/compta/facture/admin/facturedet_rec_cust_extrafields.php index cc33b8dc026..97f8b78b195 100644 --- a/htdocs/compta/facture/admin/facturedet_rec_cust_extrafields.php +++ b/htdocs/compta/facture/admin/facturedet_rec_cust_extrafields.php @@ -30,9 +30,8 @@ require '../../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/invoice.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; -$langs->load("companies"); -$langs->load("admin"); -$langs->load("bills"); +// Load translation files required by the page +$langs->loadlangs(array('companies', 'admin', 'bills')); $extrafields = new ExtraFields($db); $form = new Form($db); diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php index 3ff67cac02d..2671b6d94f0 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -64,6 +64,7 @@ if (! empty($conf->accounting->enabled)) { require_once DOL_DOCUMENT_ROOT . '/accountancy/class/accountingjournal.class.php'; } +// Load translation files required by the page $langs->loadLangs(array('bills','companies','compta','products','banks','main','withdrawals')); if (! empty($conf->incoterm->enabled)) $langs->load('incoterm'); if (! empty($conf->margin->enabled)) $langs->load('margins'); diff --git a/htdocs/compta/facture/contact.php b/htdocs/compta/facture/contact.php index 61f37d221f8..af872a174ca 100644 --- a/htdocs/compta/facture/contact.php +++ b/htdocs/compta/facture/contact.php @@ -35,8 +35,8 @@ if (! empty($conf->projet->enabled)) { require_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php'; } -$langs->load("bills"); -$langs->load("companies"); +// Load translation files required by the page +$langs->loadLangs(array('bills', 'companies')); $id = (GETPOST('id')?GETPOST('id','int'):GETPOST('facid','int')); // For backward compatibility $ref = GETPOST('ref','alpha'); diff --git a/htdocs/compta/facture/document.php b/htdocs/compta/facture/document.php index 70dcfebaacb..828c77f1178 100644 --- a/htdocs/compta/facture/document.php +++ b/htdocs/compta/facture/document.php @@ -38,11 +38,8 @@ if (! empty($conf->projet->enabled)) { require_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php'; } -$langs->load('propal'); -$langs->load('compta'); -$langs->load('other'); -$langs->load("bills"); -$langs->load('companies'); +// Load translation files required by the page +$langs->loadLangs(array('propal', 'compta', 'other', 'bills', 'companies')); $id=(GETPOST('id','int')?GETPOST('id','int'):GETPOST('facid','int')); // For backward compatibility diff --git a/htdocs/compta/facture/fiche-rec.php b/htdocs/compta/facture/fiche-rec.php index 1fc7fa1fb96..ec8f1f67bdf 100644 --- a/htdocs/compta/facture/fiche-rec.php +++ b/htdocs/compta/facture/fiche-rec.php @@ -43,10 +43,8 @@ require_once DOL_DOCUMENT_ROOT . '/core/class/doleditor.class.php'; require_once DOL_DOCUMENT_ROOT . '/core/lib/invoice.lib.php'; require_once DOL_DOCUMENT_ROOT . '/core/class/extrafields.class.php'; -$langs->load('bills'); -$langs->load('compta'); -$langs->load('admin'); -$langs->load('other'); +// Load translation files required by the page +$langs->loadLangs(array('bills', 'compta', 'admin', 'other')); $action = GETPOST('action','alpha'); $massaction = GETPOST('massaction','alpha'); diff --git a/htdocs/compta/facture/info.php b/htdocs/compta/facture/info.php index 2347178b05d..8964b85203b 100644 --- a/htdocs/compta/facture/info.php +++ b/htdocs/compta/facture/info.php @@ -32,8 +32,8 @@ if (! empty($conf->projet->enabled)) { require_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php'; } -$langs->load("companies"); -$langs->load("bills"); +// Load translation files required by the page +$langs->loadLangs(array('companies', 'bills')); $id = GETPOST("facid","int"); $ref=GETPOST("ref",'alpha'); diff --git a/htdocs/compta/facture/invoicetemplate_list.php b/htdocs/compta/facture/invoicetemplate_list.php index 3e077e8a749..87310d9b215 100644 --- a/htdocs/compta/facture/invoicetemplate_list.php +++ b/htdocs/compta/facture/invoicetemplate_list.php @@ -42,10 +42,8 @@ require_once DOL_DOCUMENT_ROOT . '/core/class/doleditor.class.php'; require_once DOL_DOCUMENT_ROOT . '/core/lib/invoice.lib.php'; require_once DOL_DOCUMENT_ROOT . '/core/class/extrafields.class.php'; -$langs->load('bills'); -$langs->load('compta'); -$langs->load('admin'); -$langs->load('other'); +// Load translation files required by the page +$langs->loadLangs(array('bills', 'compta', 'admin', 'other')); $action = GETPOST('action','alpha'); $massaction = GETPOST('massaction','alpha'); diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php index bb3cc02dce3..b90e52d0029 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -49,10 +49,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; if (! empty($conf->commande->enabled)) require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; - -$langs->load('bills'); -$langs->load('companies'); -$langs->load('products'); +// Load translation files required by the page +$langs->loadLangs(array('bills', 'companies', 'products')); $sall=trim((GETPOST('search_all', 'alphanohtml')!='')?GETPOST('search_all', 'alphanohtml'):GETPOST('sall', 'alphanohtml')); $projectid=(GETPOST('projectid')?GETPOST('projectid','int'):0); diff --git a/htdocs/compta/facture/note.php b/htdocs/compta/facture/note.php index 356ba3916a0..58fc26030b7 100644 --- a/htdocs/compta/facture/note.php +++ b/htdocs/compta/facture/note.php @@ -33,8 +33,8 @@ if (! empty($conf->projet->enabled)) { require_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php'; } -$langs->load("companies"); -$langs->load("bills"); +// Load translation files required by the page +$langs->loadLangs(array('companies', 'bills')); $id=(GETPOST('id','int')?GETPOST('id','int'):GETPOST('facid','int')); // For backward compatibility $ref=GETPOST('ref','alpha'); diff --git a/htdocs/compta/facture/prelevement.php b/htdocs/compta/facture/prelevement.php index e665eaf77d1..ecde973bd3b 100644 --- a/htdocs/compta/facture/prelevement.php +++ b/htdocs/compta/facture/prelevement.php @@ -37,10 +37,8 @@ if (! empty($conf->projet->enabled)) { if (!$user->rights->facture->lire) accessforbidden(); -$langs->load("bills"); -$langs->load("banks"); -$langs->load("withdrawals"); -$langs->load('companies'); +// Load translation files required by the page +$langs->loadLangs(array('bills', 'banks', 'withdrawals', 'companies')); $id=(GETPOST('id','int')?GETPOST('id','int'):GETPOST('facid','int')); // For backward compatibility $ref=GETPOST('ref','alpha'); diff --git a/htdocs/compta/facture/stats/index.php b/htdocs/compta/facture/stats/index.php index 2f2692055e9..f8b9705e51f 100644 --- a/htdocs/compta/facture/stats/index.php +++ b/htdocs/compta/facture/stats/index.php @@ -57,10 +57,8 @@ $endyear=$year; /* * View */ - -$langs->load('bills'); -$langs->load('companies'); -$langs->load('other'); +// Load translation files required by the page +$langs->loadLangs(array('bills', 'companies', 'other')); $form=new Form($db); diff --git a/htdocs/compta/journal/purchasesjournal.php b/htdocs/compta/journal/purchasesjournal.php index 5934ca71afb..2bc754ccf11 100644 --- a/htdocs/compta/journal/purchasesjournal.php +++ b/htdocs/compta/journal/purchasesjournal.php @@ -33,9 +33,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php'; require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.class.php'; -$langs->load("companies"); -$langs->load("other"); -$langs->load("compta"); +// Load translation files required by the page +$langs->loadlangs(array('companies', 'other', 'compta')); $date_startmonth=GETPOST('date_startmonth'); $date_startday=GETPOST('date_startday'); diff --git a/htdocs/compta/journal/sellsjournal.php b/htdocs/compta/journal/sellsjournal.php index f4b027b5016..24b36cf76c0 100644 --- a/htdocs/compta/journal/sellsjournal.php +++ b/htdocs/compta/journal/sellsjournal.php @@ -35,10 +35,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; require_once DOL_DOCUMENT_ROOT.'/societe/class/client.class.php'; - -$langs->load("companies"); -$langs->load("other"); -$langs->load("compta"); +// Load translation files required by the page +$langs->loadLangs(array('companies', 'other', 'compta')); $date_startmonth=GETPOST('date_startmonth'); $date_startday=GETPOST('date_startday'); diff --git a/htdocs/compta/localtax/card.php b/htdocs/compta/localtax/card.php index 438427fa491..e8a84fcc9e1 100644 --- a/htdocs/compta/localtax/card.php +++ b/htdocs/compta/localtax/card.php @@ -27,9 +27,8 @@ require_once DOL_DOCUMENT_ROOT.'/compta/localtax/class/localtax.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/vat.lib.php'; -$langs->load("compta"); -$langs->load("banks"); -$langs->load("bills"); +// Load translation files required by the page +$langs->loadLangs(array('compta', 'banks', 'bills')); $id=GETPOST("id",'int'); $action=GETPOST("action","alpha"); diff --git a/htdocs/compta/localtax/clients.php b/htdocs/compta/localtax/clients.php index dadb5ee5e5d..a06a0da811e 100644 --- a/htdocs/compta/localtax/clients.php +++ b/htdocs/compta/localtax/clients.php @@ -29,6 +29,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; require_once DOL_DOCUMENT_ROOT.'/compta/tva/class/tva.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/localtax/class/localtax.class.php'; +// Load translation files required by the page $langs->loadLangs(array("other","compta","banks","bills","companies","product","trips","admin")); $local=GETPOST('localTaxType', 'int'); diff --git a/htdocs/compta/localtax/index.php b/htdocs/compta/localtax/index.php index 4e825469b14..2829739fe81 100644 --- a/htdocs/compta/localtax/index.php +++ b/htdocs/compta/localtax/index.php @@ -29,6 +29,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; require_once DOL_DOCUMENT_ROOT.'/compta/tva/class/tva.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/localtax/class/localtax.class.php'; +// Load translation files required by the page $langs->loadLangs(array("other","compta","banks","bills","companies","product","trips","admin")); $localTaxType=GETPOST('localTaxType', 'int'); diff --git a/htdocs/compta/localtax/list.php b/htdocs/compta/localtax/list.php index 6668e3d61db..3ea385def11 100644 --- a/htdocs/compta/localtax/list.php +++ b/htdocs/compta/localtax/list.php @@ -24,6 +24,7 @@ require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/compta/localtax/class/localtax.class.php'; +// Load translation files required by the page $langs->load("compta"); // Security check diff --git a/htdocs/compta/localtax/quadri_detail.php b/htdocs/compta/localtax/quadri_detail.php index 8d7843b5cea..31729693f37 100644 --- a/htdocs/compta/localtax/quadri_detail.php +++ b/htdocs/compta/localtax/quadri_detail.php @@ -40,6 +40,7 @@ require_once DOL_DOCUMENT_ROOT.'/fourn/class/paiementfourn.class.php'; require_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport.class.php'; require_once DOL_DOCUMENT_ROOT.'/expensereport/class/paymentexpensereport.class.php'; +// Load translation files required by the page $langs->loadLangs(array("other","compta","banks","bills","companies","product","trips","admin")); $local=GETPOST('localTaxType', 'int'); diff --git a/htdocs/compta/paiement.php b/htdocs/compta/paiement.php index 7bec5e79491..6c9f8014e19 100644 --- a/htdocs/compta/paiement.php +++ b/htdocs/compta/paiement.php @@ -35,7 +35,7 @@ require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; -// Load translation files required by page +// Load translation files required by the page $langs->loadLangs(array('companies', 'bills', 'banks', 'multicurrency')); $action = GETPOST('action','alpha'); diff --git a/htdocs/compta/paiement/card.php b/htdocs/compta/paiement/card.php index 7c97b75d293..656d6c673f2 100644 --- a/htdocs/compta/paiement/card.php +++ b/htdocs/compta/paiement/card.php @@ -34,6 +34,7 @@ require_once DOL_DOCUMENT_ROOT .'/core/modules/facture/modules_facture.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/payments.lib.php'; if (! empty($conf->banque->enabled)) require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; +// Load translation files required by the page $langs->loadLangs(array('bills','banks','companies')); $id=GETPOST('id','int'); diff --git a/htdocs/compta/paiement/cheque/card.php b/htdocs/compta/paiement/cheque/card.php index 8489e82ae33..69f3bd102df 100644 --- a/htdocs/compta/paiement/cheque/card.php +++ b/htdocs/compta/paiement/cheque/card.php @@ -32,11 +32,8 @@ require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/paiement/cheque/class/remisecheque.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; -$langs->load("banks"); -$langs->load("categories"); -$langs->load('bills'); -$langs->load('companies'); -$langs->load('compta'); +// Load translation files required by the page +$langs->loadLangs(array('banks', 'categories', 'bills', 'companies', 'compta')); $id =GETPOST('id','int'); $ref=GETPOST('ref', 'alpha'); diff --git a/htdocs/compta/paiement/cheque/index.php b/htdocs/compta/paiement/cheque/index.php index 74fe9ea9455..ae7195810f9 100644 --- a/htdocs/compta/paiement/cheque/index.php +++ b/htdocs/compta/paiement/cheque/index.php @@ -28,10 +28,8 @@ require('../../../main.inc.php'); require_once DOL_DOCUMENT_ROOT.'/compta/paiement/cheque/class/remisecheque.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; -$langs->load("banks"); -$langs->load("categories"); -$langs->load("compta"); -$langs->load("bills"); +// Load translation files required by the page +$langs->loadLangs(array('banks', 'categories', 'compta', 'bills')); // Security check if ($user->societe_id) $socid=$user->societe_id; diff --git a/htdocs/compta/paiement/cheque/list.php b/htdocs/compta/paiement/cheque/list.php index b9e8cac609a..d626030bae0 100644 --- a/htdocs/compta/paiement/cheque/list.php +++ b/htdocs/compta/paiement/cheque/list.php @@ -31,9 +31,8 @@ require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; -$langs->load("banks"); -$langs->load("categories"); -$langs->load("bills"); +// Load translation files required by the page +$langs->loadLangs(array('banks', 'categories', 'bills')); // Security check if ($user->societe_id) $socid=$user->societe_id; diff --git a/htdocs/compta/paiement/info.php b/htdocs/compta/paiement/info.php index d0bda152b21..9f55761dba0 100644 --- a/htdocs/compta/paiement/info.php +++ b/htdocs/compta/paiement/info.php @@ -28,8 +28,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/payments.lib.php'; -$langs->load("bills"); -$langs->load("companies"); +// Load translation files required by the page +$langs->loadLangs(array('bills', 'companies')); $id=GETPOST('id'); $ref=GETPOST('ref', 'alpha'); diff --git a/htdocs/compta/paiement/list.php b/htdocs/compta/paiement/list.php index 017593316a7..064ca877c3f 100644 --- a/htdocs/compta/paiement/list.php +++ b/htdocs/compta/paiement/list.php @@ -35,8 +35,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingjournal.class.php'; -$langs->load("bills"); -$langs->load("compta"); +// Load translation files required by the page +$langs->loadLangs(array('bills', 'compta')); // Security check $facid = GETPOST('facid','int'); diff --git a/htdocs/compta/paiement/tovalidate.php b/htdocs/compta/paiement/tovalidate.php index 031a0ff354a..e60f65f924e 100644 --- a/htdocs/compta/paiement/tovalidate.php +++ b/htdocs/compta/paiement/tovalidate.php @@ -24,6 +24,7 @@ require '../../main.inc.php'; +// Load translation files required by the page $langs->load("bills"); // Security check diff --git a/htdocs/compta/paiement_charge.php b/htdocs/compta/paiement_charge.php index e966eba4a47..cadf897c57f 100644 --- a/htdocs/compta/paiement_charge.php +++ b/htdocs/compta/paiement_charge.php @@ -27,6 +27,7 @@ require_once DOL_DOCUMENT_ROOT.'/compta/sociales/class/chargesociales.class.php' require_once DOL_DOCUMENT_ROOT.'/compta/sociales/class/paymentsocialcontribution.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; +// Load translation files required by the page $langs->load("bills"); $chid=GETPOST("id", 'int'); diff --git a/htdocs/compta/payment_sc/card.php b/htdocs/compta/payment_sc/card.php index 8e76a219c3d..b395016aeed 100644 --- a/htdocs/compta/payment_sc/card.php +++ b/htdocs/compta/payment_sc/card.php @@ -32,9 +32,8 @@ require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/modules/facture/modules_facture.php'; if (! empty($conf->banque->enabled)) require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; -$langs->load('bills'); -$langs->load('banks'); -$langs->load('companies'); +// Load translation files required by the page +$langs->loadLangs(array('bills', 'banks', 'companies')); // Security check $id=GETPOST("id",'int'); diff --git a/htdocs/compta/prelevement/bons.php b/htdocs/compta/prelevement/bons.php index 02c6e7b08f0..50a7c865d2c 100644 --- a/htdocs/compta/prelevement/bons.php +++ b/htdocs/compta/prelevement/bons.php @@ -28,9 +28,8 @@ require('../../main.inc.php'); require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/bonprelevement.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; -$langs->load("banks"); -$langs->load("categories"); -$langs->load("widthdrawals"); +// Load translation files required by the page +$langs->loadLangs(array('banks', 'categories', 'widthdrawals')); // Security check $socid = GETPOST('socid','int'); diff --git a/htdocs/compta/prelevement/card.php b/htdocs/compta/prelevement/card.php index a6d739f1f0c..343a45472b6 100644 --- a/htdocs/compta/prelevement/card.php +++ b/htdocs/compta/prelevement/card.php @@ -29,8 +29,8 @@ require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/ligneprelevement.class require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/bonprelevement.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; -$langs->load("banks"); -$langs->load("categories"); +// Load translation files required by the page +$langs->loadLangs(array('banks', 'categories')); if (!$user->rights->prelevement->bons->lire) accessforbidden(); diff --git a/htdocs/compta/prelevement/create.php b/htdocs/compta/prelevement/create.php index c1d87a4c1b5..74bd282d606 100644 --- a/htdocs/compta/prelevement/create.php +++ b/htdocs/compta/prelevement/create.php @@ -34,11 +34,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/prelevement.lib.php'; require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; -$langs->load("banks"); -$langs->load("categories"); -$langs->load("widthdrawals"); -$langs->load("companies"); -$langs->load("bills"); +// Load translation files required by the page +$langs->loadLangs(array('banks', 'categories', 'widthdrawals', 'companies', 'bills')); // Security check if ($user->societe_id) $socid=$user->societe_id; diff --git a/htdocs/compta/prelevement/demandes.php b/htdocs/compta/prelevement/demandes.php index 765e0cf4fa8..d20f92cb188 100644 --- a/htdocs/compta/prelevement/demandes.php +++ b/htdocs/compta/prelevement/demandes.php @@ -30,10 +30,8 @@ require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; -$langs->load("banks"); -$langs->load("categories"); -$langs->load("withdrawals"); -$langs->load("companies"); +// Load translation files required by the page +$langs->loadLangs(array('banks', 'categories', 'withdrawals', 'companies')); // Security check $socid = GETPOST('socid','int'); diff --git a/htdocs/compta/prelevement/factures.php b/htdocs/compta/prelevement/factures.php index d446e64fe9b..2eabd64873d 100644 --- a/htdocs/compta/prelevement/factures.php +++ b/htdocs/compta/prelevement/factures.php @@ -31,11 +31,8 @@ require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/rejetprelevement.class require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; -$langs->load("banks"); -$langs->load("categories"); -$langs->load("companies"); -$langs->load('withdrawals'); -$langs->load('bills'); +// Load translation files required by the page +$langs->loadLangs(array('banks', 'categories', 'companies', 'withdrawals', 'bills')); // Securite acces client if ($user->societe_id > 0) accessforbidden(); diff --git a/htdocs/compta/prelevement/fiche-rejet.php b/htdocs/compta/prelevement/fiche-rejet.php index 2fbaaf7fbcb..113153bc896 100644 --- a/htdocs/compta/prelevement/fiche-rejet.php +++ b/htdocs/compta/prelevement/fiche-rejet.php @@ -31,6 +31,7 @@ require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/rejetprelevement.class require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; +// Load translation files required by the page $langs->loadLangs(array("banks","categories",'withdrawals','bills')); // Securite acces client diff --git a/htdocs/compta/prelevement/fiche-stat.php b/htdocs/compta/prelevement/fiche-stat.php index f0e335da5cf..c126212f17c 100644 --- a/htdocs/compta/prelevement/fiche-stat.php +++ b/htdocs/compta/prelevement/fiche-stat.php @@ -29,6 +29,7 @@ require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/bonprelevement.class.p require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/ligneprelevement.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; +// Load translation files required by the page $langs->loadLangs(array("banks","categories",'withdrawals','bills')); // Security check diff --git a/htdocs/compta/prelevement/index.php b/htdocs/compta/prelevement/index.php index 64e1991064d..de99b56eb19 100644 --- a/htdocs/compta/prelevement/index.php +++ b/htdocs/compta/prelevement/index.php @@ -33,9 +33,8 @@ require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/prelevement.lib.php'; require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; -$langs->load("banks"); -$langs->load("categories"); -$langs->load("withdrawals"); +// Load translation files required by the page +$langs->loadLangs(array('banks', 'categories', 'withdrawals')); // Security check $socid = GETPOST('socid','int'); diff --git a/htdocs/compta/prelevement/ligne.php b/htdocs/compta/prelevement/ligne.php index bb5598cf81f..721cf62bcd7 100644 --- a/htdocs/compta/prelevement/ligne.php +++ b/htdocs/compta/prelevement/ligne.php @@ -31,10 +31,8 @@ require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/rejetprelevement.class require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; -$langs->load("banks"); -$langs->load("categories"); -$langs->load("bills"); -$langs->load("withdrawals"); +// Load translation files required by the page +$langs->loadlangs(array('banks', 'categories', 'bills', 'withdrawals')); // Security check if ($user->societe_id > 0) accessforbidden(); diff --git a/htdocs/compta/prelevement/list.php b/htdocs/compta/prelevement/list.php index 10634670f5f..8d657f00221 100644 --- a/htdocs/compta/prelevement/list.php +++ b/htdocs/compta/prelevement/list.php @@ -29,10 +29,8 @@ require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/bonprelevement.class.p require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/ligneprelevement.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; -$langs->load("banks"); -$langs->load("withdrawals"); -$langs->load("companies"); -$langs->load("categories"); +// Load translation files required by the page +$langs->loadLangs(array('banks', 'withdrawals', 'companies', 'categories')); // Security check $socid = GETPOST('socid','int'); diff --git a/htdocs/compta/prelevement/rejets.php b/htdocs/compta/prelevement/rejets.php index 3c18207f451..c8812bba1a9 100644 --- a/htdocs/compta/prelevement/rejets.php +++ b/htdocs/compta/prelevement/rejets.php @@ -30,10 +30,8 @@ require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/ligneprelevement.class require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; -$langs->load("banks"); -$langs->load("categories"); -$langs->load("withdrawals"); -$langs->load("companies"); +// Load translation files required by the page +$langs->loadLangs(array('banks', 'categories', 'withdrawals', 'companies')); // Security check $socid = GETPOST('socid','int'); diff --git a/htdocs/compta/prelevement/stats.php b/htdocs/compta/prelevement/stats.php index 406c2303b6a..20d213e820b 100644 --- a/htdocs/compta/prelevement/stats.php +++ b/htdocs/compta/prelevement/stats.php @@ -28,10 +28,8 @@ require('../../main.inc.php'); require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/ligneprelevement.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; -$langs->load("banks"); -$langs->load("categories"); -$langs->load("withdrawals"); -$langs->load("companies"); +// Load translation files required by the page +$langs->loadLangs(array('banks', 'categories', 'withdrawals', 'companies')); // Security check $socid = GETPOST('socid','int'); diff --git a/htdocs/compta/recap-compta.php b/htdocs/compta/recap-compta.php index 6102c9fd734..fa1dfa8d79f 100644 --- a/htdocs/compta/recap-compta.php +++ b/htdocs/compta/recap-compta.php @@ -28,6 +28,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php'; +// Load translation files required by the page $langs->load("companies"); if (! empty($conf->facture->enabled)) $langs->load("bills"); diff --git a/htdocs/compta/resultat/clientfourn.php b/htdocs/compta/resultat/clientfourn.php index 5692f3d97bb..c9e32b9a97f 100644 --- a/htdocs/compta/resultat/clientfourn.php +++ b/htdocs/compta/resultat/clientfourn.php @@ -36,6 +36,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/tax.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountancycategory.class.php'; +// Load translation files required by the page $langs->loadLangs(array('compta','bills','donation','salaries','accountancy')); $date_startmonth=GETPOST('date_startmonth','int'); diff --git a/htdocs/compta/resultat/index.php b/htdocs/compta/resultat/index.php index c4131dc365b..4cd13d37c89 100644 --- a/htdocs/compta/resultat/index.php +++ b/htdocs/compta/resultat/index.php @@ -30,6 +30,7 @@ require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/report.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; +// Load translation files required by the page $langs->loadLangs(array('compta','bills','donation','salaries')); $date_startmonth=GETPOST('date_startmonth','int'); diff --git a/htdocs/compta/resultat/result.php b/htdocs/compta/resultat/result.php index 7854f6656ed..23c7e91b989 100644 --- a/htdocs/compta/resultat/result.php +++ b/htdocs/compta/resultat/result.php @@ -30,6 +30,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formaccounting.class.php'; require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountancycategory.class.php'; +// Load translation files required by the page $langs->loadLangs(array('compta','bills','donation','salaries','accountancy')); $error = 0; @@ -537,4 +538,4 @@ print ""; print ''; llxFooter(); -$db->close(); \ No newline at end of file +$db->close(); diff --git a/htdocs/compta/salaries/card.php b/htdocs/compta/salaries/card.php index a525e876f81..45fee127642 100644 --- a/htdocs/compta/salaries/card.php +++ b/htdocs/compta/salaries/card.php @@ -30,6 +30,7 @@ require_once DOL_DOCUMENT_ROOT.'/compta/salaries/class/paymentsalary.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/salaries.lib.php'; +// Load translation files required by the page $langs->loadLangs(array("compta","banks","bills","users","salaries","hrm")); $id=GETPOST("id",'int'); diff --git a/htdocs/compta/salaries/document.php b/htdocs/compta/salaries/document.php index f866042cda0..99c34f60815 100644 --- a/htdocs/compta/salaries/document.php +++ b/htdocs/compta/salaries/document.php @@ -35,6 +35,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/salaries.lib.php'; require_once DOL_DOCUMENT_ROOT.'/compta/salaries/class/paymentsalary.class.php'; +// Load translation files required by the page $langs->loadLangs(array("compta","bills","users","salaries","hrm")); $id = GETPOST('id','int'); diff --git a/htdocs/compta/salaries/index.php b/htdocs/compta/salaries/index.php index a88ec8683a9..5173c69a65b 100644 --- a/htdocs/compta/salaries/index.php +++ b/htdocs/compta/salaries/index.php @@ -28,6 +28,7 @@ require_once DOL_DOCUMENT_ROOT.'/compta/salaries/class/paymentsalary.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; if (! empty($conf->accounting->enabled)) require_once DOL_DOCUMENT_ROOT . '/accountancy/class/accountingjournal.class.php'; +// Load translation files required by the page $langs->loadLangs(array("compta","salaries","bills","hrm")); // Security check diff --git a/htdocs/compta/salaries/info.php b/htdocs/compta/salaries/info.php index ab5bcdcb558..467abe3618c 100644 --- a/htdocs/compta/salaries/info.php +++ b/htdocs/compta/salaries/info.php @@ -28,6 +28,7 @@ require_once DOL_DOCUMENT_ROOT.'/compta/salaries/class/paymentsalary.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/salaries.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; +// Load translation files required by the page $langs->loadLangs(array("compta","bills","users","salaries","hrm")); $id=GETPOST('id','int'); diff --git a/htdocs/compta/salaries/stats/index.php b/htdocs/compta/salaries/stats/index.php index ad9425e76c4..3e6fd56a266 100644 --- a/htdocs/compta/salaries/stats/index.php +++ b/htdocs/compta/salaries/stats/index.php @@ -26,6 +26,7 @@ require '../../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/salaries/class/salariesstats.class.php'; +// Load translation files required by the page $langs->loadLangs(array("salaries","companies")); $WIDTH=DolGraph::getDefaultGraphSizeForStats('width'); diff --git a/htdocs/compta/sociales/card.php b/htdocs/compta/sociales/card.php index d7bdd9c77e6..85e555de468 100644 --- a/htdocs/compta/sociales/card.php +++ b/htdocs/compta/sociales/card.php @@ -38,8 +38,8 @@ if (! empty($conf->accounting->enabled)) { require_once DOL_DOCUMENT_ROOT . '/accountancy/class/accountingjournal.class.php'; } -$langs->load("compta"); -$langs->load("bills"); +// Load translation files required by the page +$langs->loadLangs(array('compta', 'bills')); $id=GETPOST('id','int'); $action=GETPOST('action','aZ09'); diff --git a/htdocs/compta/sociales/document.php b/htdocs/compta/sociales/document.php index 0e2bcc5c986..490dbf3a1fe 100644 --- a/htdocs/compta/sociales/document.php +++ b/htdocs/compta/sociales/document.php @@ -39,10 +39,8 @@ if (! empty($conf->projet->enabled)) require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php'; } -$langs->load("other"); -$langs->load("companies"); -$langs->load("compta"); -$langs->load("bills"); +// Load translation files required by the page +$langs->loadLangs(array('other', 'companies', 'compta', 'bills')); $id = GETPOST('id','int'); $action = GETPOST('action','aZ09'); diff --git a/htdocs/compta/sociales/index.php b/htdocs/compta/sociales/index.php index d38ae348c90..a9e2a27840a 100644 --- a/htdocs/compta/sociales/index.php +++ b/htdocs/compta/sociales/index.php @@ -28,9 +28,8 @@ require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/compta/sociales/class/chargesociales.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formsocialcontrib.class.php'; -$langs->load("compta"); -$langs->load("banks"); -$langs->load("bills"); +// Load translation files required by the page +$langs->loadLangs(array('compta', 'banks', 'bills')); // Security check $socid = isset($_GET["socid"])?$_GET["socid"]:''; diff --git a/htdocs/compta/sociales/info.php b/htdocs/compta/sociales/info.php index dfa6439a3f4..1827c1597f8 100644 --- a/htdocs/compta/sociales/info.php +++ b/htdocs/compta/sociales/info.php @@ -31,8 +31,8 @@ if (! empty($conf->projet->enabled)) require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php'; } -$langs->load("compta"); -$langs->load("bills"); +// Load translation files required by the page +$langs->loadLangs(array('compta', 'bills')); $id=GETPOST('id','int'); $action=GETPOST('action','aZ09'); diff --git a/htdocs/compta/sociales/payments.php b/htdocs/compta/sociales/payments.php index 6abb6013095..379abd7af09 100644 --- a/htdocs/compta/sociales/payments.php +++ b/htdocs/compta/sociales/payments.php @@ -33,8 +33,8 @@ require_once DOL_DOCUMENT_ROOT.'/compta/sociales/class/paymentsocialcontribution require_once DOL_DOCUMENT_ROOT.'/compta/salaries/class/paymentsalary.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; -$langs->load("compta"); -$langs->load("bills"); +// Load translation files required by the page +$langs->loadLangs(array('compta', 'bills')); // Security check if ($user->societe_id) $socid=$user->societe_id; diff --git a/htdocs/compta/stats/byratecountry.php b/htdocs/compta/stats/byratecountry.php index 33649dd51e0..78a9187be57 100644 --- a/htdocs/compta/stats/byratecountry.php +++ b/htdocs/compta/stats/byratecountry.php @@ -34,6 +34,7 @@ require_once DOL_DOCUMENT_ROOT.'/fourn/class/paiementfourn.class.php'; require_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport.class.php'; require_once DOL_DOCUMENT_ROOT.'/expensereport/class/paymentexpensereport.class.php'; +// Load translation files required by the page $langs->loadLangs(array("other","compta","banks","bills","companies","product","trips","admin","accountancy")); $modecompta = GETPOST('modecompta','alpha'); diff --git a/htdocs/compta/stats/cabyprodserv.php b/htdocs/compta/stats/cabyprodserv.php index e4d1f16cb8b..5c2a50325a7 100644 --- a/htdocs/compta/stats/cabyprodserv.php +++ b/htdocs/compta/stats/cabyprodserv.php @@ -29,6 +29,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; +// Load translation files required by the page $langs->loadLangs(array("products","categories","errors",'accountancy')); // Security pack (data & check) diff --git a/htdocs/compta/stats/cabyuser.php b/htdocs/compta/stats/cabyuser.php index 1d386df6c6f..8b1e1f0f106 100644 --- a/htdocs/compta/stats/cabyuser.php +++ b/htdocs/compta/stats/cabyuser.php @@ -28,6 +28,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/report.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/tax.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; +// Load translation files required by the page $langs->load("accountancy"); $socid = GETPOST('socid','int'); diff --git a/htdocs/compta/stats/casoc.php b/htdocs/compta/stats/casoc.php index 5c1e8cc4db7..1555b3c79ac 100644 --- a/htdocs/compta/stats/casoc.php +++ b/htdocs/compta/stats/casoc.php @@ -34,10 +34,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.form.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; -$langs->load("companies"); -$langs->load("categories"); -$langs->load("bills"); -$langs->load("compta"); +// Load translation files required by the page +$langs->loadLangs(array('companies', 'categories', 'bills', 'compta')); // Define modecompta ('CREANCES-DETTES' or 'RECETTES-DEPENSES') $modecompta = $conf->global->ACCOUNTING_MODE; diff --git a/htdocs/compta/stats/index.php b/htdocs/compta/stats/index.php index bb5cb25e30d..dd24a6cd507 100644 --- a/htdocs/compta/stats/index.php +++ b/htdocs/compta/stats/index.php @@ -27,6 +27,7 @@ require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/report.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; +// Load translation files required by the page $langs->loadLangs(array('compta','bills','donation','salaries')); $date_startmonth=GETPOST('date_startmonth'); diff --git a/htdocs/compta/tva/card.php b/htdocs/compta/tva/card.php index 240a4624d44..4480682b091 100644 --- a/htdocs/compta/tva/card.php +++ b/htdocs/compta/tva/card.php @@ -29,9 +29,8 @@ require_once DOL_DOCUMENT_ROOT.'/compta/tva/class/tva.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/vat.lib.php'; -$langs->load("compta"); -$langs->load("banks"); -$langs->load("bills"); +// Load translation files required by the page +$langs->loadLangs(array('compta', 'banks', 'bills')); $id=GETPOST("id",'int'); $action=GETPOST("action","alpha"); diff --git a/htdocs/compta/tva/clients.php b/htdocs/compta/tva/clients.php index 734f4880e48..ae95d71ca9c 100644 --- a/htdocs/compta/tva/clients.php +++ b/htdocs/compta/tva/clients.php @@ -39,6 +39,7 @@ require_once DOL_DOCUMENT_ROOT.'/fourn/class/paiementfourn.class.php'; require_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport.class.php'; require_once DOL_DOCUMENT_ROOT.'/expensereport/class/paymentexpensereport.class.php'; +// Load translation files required by the page $langs->loadLangs(array("other","compta","banks","bills","companies","product","trips","admin")); // Date range diff --git a/htdocs/compta/tva/document.php b/htdocs/compta/tva/document.php index 04d65dfadf5..b83cad80bdd 100644 --- a/htdocs/compta/tva/document.php +++ b/htdocs/compta/tva/document.php @@ -40,10 +40,8 @@ if (! empty($conf->projet->enabled)) require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php'; } -$langs->load("other"); -$langs->load("companies"); -$langs->load("compta"); -$langs->load("bills"); +// Load translation files required by the page +$langs->loadLangs(array('other', 'companies', 'compta', 'bills')); $id = GETPOST('id','int'); $action = GETPOST('action','aZ09'); diff --git a/htdocs/compta/tva/index.php b/htdocs/compta/tva/index.php index 0eb40cd4d56..528bf7ef09a 100644 --- a/htdocs/compta/tva/index.php +++ b/htdocs/compta/tva/index.php @@ -31,6 +31,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; require_once DOL_DOCUMENT_ROOT.'/compta/tva/class/tva.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/localtax/class/localtax.class.php'; +// Load translation files required by the page $langs->loadLangs(array("other","compta","banks","bills","companies","product","trips","admin")); // Date range diff --git a/htdocs/compta/tva/info.php b/htdocs/compta/tva/info.php index 24208aedf2a..4a2308bd0bd 100644 --- a/htdocs/compta/tva/info.php +++ b/htdocs/compta/tva/info.php @@ -26,8 +26,8 @@ require_once DOL_DOCUMENT_ROOT.'/compta/tva/class/tva.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/vat.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; -$langs->load("compta"); -$langs->load("bills"); +// Load translation files required by the page +$langs->loadLangs(array('compta', 'bills')); $id=GETPOST('id','int'); $action=GETPOST('action','aZ09'); diff --git a/htdocs/compta/tva/list.php b/htdocs/compta/tva/list.php index efe436a3704..97932d7b1ba 100644 --- a/htdocs/compta/tva/list.php +++ b/htdocs/compta/tva/list.php @@ -31,8 +31,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingjournal.class.php'; -$langs->load("compta"); -$langs->load("bills"); +// Load translation files required by the page +$langs->loadLangs(array('compta', 'bills')); // Security check $socid = GETPOST('socid','int'); diff --git a/htdocs/compta/tva/quadri_detail.php b/htdocs/compta/tva/quadri_detail.php index 0866bafad0c..e2c7cc5d793 100644 --- a/htdocs/compta/tva/quadri_detail.php +++ b/htdocs/compta/tva/quadri_detail.php @@ -39,6 +39,7 @@ require_once DOL_DOCUMENT_ROOT.'/fourn/class/paiementfourn.class.php'; require_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport.class.php'; require_once DOL_DOCUMENT_ROOT.'/expensereport/class/paymentexpensereport.class.php'; +// Load translation files required by the page $langs->loadLangs(array("other","compta","banks","bills","companies","product","trips","admin")); // Date range