diff --git a/htdocs/admin/accountant.php b/htdocs/admin/accountant.php index 73d6be66ed7..2afd97f40c5 100644 --- a/htdocs/admin/accountant.php +++ b/htdocs/admin/accountant.php @@ -31,8 +31,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; $action=GETPOST('action','aZ09'); $contextpage=GETPOST('contextpage','aZ')?GETPOST('contextpage','aZ'):'adminaccoutant'; // To manage different context of search -$langs->load("admin"); -$langs->load("companies"); +// Load translation files required by the page +$langs->loadLangs(array('admin', 'companies')); if (! $user->admin) accessforbidden(); diff --git a/htdocs/admin/agenda.php b/htdocs/admin/agenda.php index 748fc7a0309..6fedfa6d2cb 100644 --- a/htdocs/admin/agenda.php +++ b/htdocs/admin/agenda.php @@ -31,9 +31,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/agenda.lib.php'; if (!$user->admin) accessforbidden(); -$langs->load("admin"); -$langs->load("other"); -$langs->load("agenda"); +// Load translation files required by the page +$langs->loadLangs(array('admin', 'other', 'agenda')); $action = GETPOST('action','alpha'); $cancel = GETPOST('cancel','alpha'); diff --git a/htdocs/admin/agenda_extrafields.php b/htdocs/admin/agenda_extrafields.php index 4c61500494d..fadb144b883 100644 --- a/htdocs/admin/agenda_extrafields.php +++ b/htdocs/admin/agenda_extrafields.php @@ -34,9 +34,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; if (!$user->admin) accessforbidden(); -$langs->load("admin"); -$langs->load("other"); -$langs->load("agenda"); +// Load translation files required by the page +$langs->loadLangs(array('admin', 'other', 'agenda')); $extrafields = new ExtraFields($db); $form = new Form($db); diff --git a/htdocs/admin/agenda_extsites.php b/htdocs/admin/agenda_extsites.php index f40ab648e42..906ecd8d092 100644 --- a/htdocs/admin/agenda_extsites.php +++ b/htdocs/admin/agenda_extsites.php @@ -34,9 +34,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; if (!$user->admin) accessforbidden(); -$langs->load("agenda"); -$langs->load("admin"); -$langs->load("other"); +// Load translation files required by the page +$langs->loadLangs(array('agenda', 'admin', 'other')); $def = array(); $actiontest=GETPOST('test','alpha'); diff --git a/htdocs/admin/agenda_other.php b/htdocs/admin/agenda_other.php index b6b332a4b99..2d20d285720 100644 --- a/htdocs/admin/agenda_other.php +++ b/htdocs/admin/agenda_other.php @@ -34,9 +34,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php'; if (!$user->admin) accessforbidden(); -$langs->load("admin"); -$langs->load("other"); -$langs->load("agenda"); +// Load translation files required by the page +$langs->loadLangs(array('admin', 'other', 'agenda')); $action = GETPOST('action','alpha'); $value = GETPOST('value','alpha'); diff --git a/htdocs/admin/agenda_reminder.php b/htdocs/admin/agenda_reminder.php index 76b69073f25..e78a8e089ed 100644 --- a/htdocs/admin/agenda_reminder.php +++ b/htdocs/admin/agenda_reminder.php @@ -29,6 +29,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php'; if (!$user->admin) accessforbidden(); +// Load translation files required by the page $langs->loadLangs(array("admin","other","agenda")); $action = GETPOST('action','alpha'); diff --git a/htdocs/admin/agenda_xcal.php b/htdocs/admin/agenda_xcal.php index ab0effc2c45..481a850790e 100644 --- a/htdocs/admin/agenda_xcal.php +++ b/htdocs/admin/agenda_xcal.php @@ -32,6 +32,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/agenda.lib.php'; if (!$user->admin) accessforbidden(); +// Load translation files required by the page $langs->loadLangs(array("admin","other","agenda")); $def = array(); diff --git a/htdocs/admin/bank.php b/htdocs/admin/bank.php index dcecd0c78c1..a4e9e4bb210 100644 --- a/htdocs/admin/bank.php +++ b/htdocs/admin/bank.php @@ -31,7 +31,7 @@ require_once DOL_DOCUMENT_ROOT . '/core/lib/bank.lib.php'; require_once DOL_DOCUMENT_ROOT . '/compta/bank/class/account.class.php'; require_once DOL_DOCUMENT_ROOT . '/societe/class/companybankaccount.class.php'; -// Load traductions files requiredby by page +// Load translation files required by the page $langs->loadLangs(array("admin","companies","bills","other","banks")); if (!$user->admin) diff --git a/htdocs/admin/bank_extrafields.php b/htdocs/admin/bank_extrafields.php index aba65f63887..19446092923 100644 --- a/htdocs/admin/bank_extrafields.php +++ b/htdocs/admin/bank_extrafields.php @@ -30,8 +30,8 @@ require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/bank.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; -$langs->load("banks"); -$langs->load("admin"); +// Load translation files required by the page +$langs->loadLangs(array('banks', 'admin')); $extrafields = new ExtraFields($db); $form = new Form($db); diff --git a/htdocs/admin/barcode.php b/htdocs/admin/barcode.php index db2b85fa986..7c6792e1a02 100644 --- a/htdocs/admin/barcode.php +++ b/htdocs/admin/barcode.php @@ -28,6 +28,7 @@ require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formbarcode.class.php'; +// Load translation files required by the page $langs->load("admin"); if (!$user->admin) accessforbidden(); diff --git a/htdocs/admin/boxes.php b/htdocs/admin/boxes.php index bc1dc74f6c4..04fd76e96fc 100644 --- a/htdocs/admin/boxes.php +++ b/htdocs/admin/boxes.php @@ -28,8 +28,8 @@ include_once DOL_DOCUMENT_ROOT.'/core/boxes/modules_boxes.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/infobox.class.php'; include_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; -$langs->load("admin"); -$langs->load("boxes"); +// Load translation files required by the page +$langs->loadLangs(array('admin', 'boxes')); if (! $user->admin) accessforbidden(); diff --git a/htdocs/admin/chequereceipts.php b/htdocs/admin/chequereceipts.php index 0d2363f60c8..df628ecc87f 100644 --- a/htdocs/admin/chequereceipts.php +++ b/htdocs/admin/chequereceipts.php @@ -31,7 +31,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/bank.lib.php'; require_once DOL_DOCUMENT_ROOT.'/compta/paiement/cheque/class/remisecheque.class.php'; -// Load traductions files requiredby by page +// Load translation files required by the page $langs->loadLangs(array("admin","companies","bills","other","banks")); if (!$user->admin) diff --git a/htdocs/admin/clicktodial.php b/htdocs/admin/clicktodial.php index 582131b22f3..c2cfaf9f72a 100644 --- a/htdocs/admin/clicktodial.php +++ b/htdocs/admin/clicktodial.php @@ -26,6 +26,7 @@ require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; +// Load translation files required by the page $langs->load("admin"); if (!$user->admin) accessforbidden(); diff --git a/htdocs/admin/commande.php b/htdocs/admin/commande.php index cd4f4ca4ab2..cee12e4b08e 100644 --- a/htdocs/admin/commande.php +++ b/htdocs/admin/commande.php @@ -36,10 +36,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php'; require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/order.lib.php'; -$langs->load("admin"); -$langs->load("errors"); -$langs->load("orders"); -$langs->load('other'); +// Load translation files required by the page +$langs->loadLangs(array('admin', 'errors', 'orders', 'other')); if (! $user->admin) accessforbidden(); diff --git a/htdocs/admin/company.php b/htdocs/admin/company.php index ab5e3f103fd..334a01c865a 100644 --- a/htdocs/admin/company.php +++ b/htdocs/admin/company.php @@ -40,8 +40,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; $action=GETPOST('action','aZ09'); $contextpage=GETPOST('contextpage','aZ')?GETPOST('contextpage','aZ'):'admincompany'; // To manage different context of search -$langs->load("admin"); -$langs->load("companies"); +// Load translation files required by the page +$langs->loadLangs(array('admin', 'companies')); if (! $user->admin) accessforbidden(); diff --git a/htdocs/admin/compta.php b/htdocs/admin/compta.php index 3f765d3e18c..8e17541bfef 100644 --- a/htdocs/admin/compta.php +++ b/htdocs/admin/compta.php @@ -29,9 +29,8 @@ require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; -$langs->load('admin'); -$langs->load('compta'); -$langs->load('accountancy'); +// Load translation files required by the page +$langs->loadLangs(array('admin', 'compta', 'accountancy')); if (!$user->admin) accessforbidden(); diff --git a/htdocs/admin/confexped.php b/htdocs/admin/confexped.php index cd771cdb0f7..e4691a42e78 100644 --- a/htdocs/admin/confexped.php +++ b/htdocs/admin/confexped.php @@ -29,9 +29,8 @@ require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/expedition.lib.php'; -$langs->load("admin"); -$langs->load("sendings"); -$langs->load("deliveries"); +// Load translation files required by the page +$langs->loadLangs(array('admin', 'sendings', 'deliveries')); if (!$user->admin) accessforbidden(); diff --git a/htdocs/admin/const.php b/htdocs/admin/const.php index 7d7b8a8510c..afb2d31efce 100644 --- a/htdocs/admin/const.php +++ b/htdocs/admin/const.php @@ -27,6 +27,7 @@ require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; +// Load translation files required by the page $langs->load("admin"); if (! $user->admin) diff --git a/htdocs/admin/contract.php b/htdocs/admin/contract.php index 82fa51e5ca8..74f7acb04f3 100644 --- a/htdocs/admin/contract.php +++ b/htdocs/admin/contract.php @@ -28,7 +28,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php'; require_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/contract.lib.php'; -// Load traductions files requiredby by page +// Load translation files required by the page $langs->loadLangs(array("admin","errors","contracts")); if (!$user->admin) accessforbidden(); diff --git a/htdocs/admin/dav.php b/htdocs/admin/dav.php index 091c9ff66bf..4f3d45294a9 100644 --- a/htdocs/admin/dav.php +++ b/htdocs/admin/dav.php @@ -25,6 +25,7 @@ require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/dav/dav.lib.php'; +// Load translation files required by the page $langs->loadLangs(array("admin","other","agenda")); if (!$user->admin) diff --git a/htdocs/admin/defaultvalues.php b/htdocs/admin/defaultvalues.php index 5c17fd32eb0..0633ee90965 100644 --- a/htdocs/admin/defaultvalues.php +++ b/htdocs/admin/defaultvalues.php @@ -26,12 +26,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php'; -$langs->load("companies"); -$langs->load("products"); -$langs->load("admin"); -$langs->load("sms"); -$langs->load("other"); -$langs->load("errors"); +// Load translation files required by the page +$langs->loadLangs(array('companies', 'products', 'admin', 'sms', 'other', 'errors')); if (!$user->admin) accessforbidden(); diff --git a/htdocs/admin/delais.php b/htdocs/admin/delais.php index 4cf423b317f..ae3c43c5b24 100644 --- a/htdocs/admin/delais.php +++ b/htdocs/admin/delais.php @@ -27,6 +27,7 @@ require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; +// Load translation files required by the page $langs->load("admin"); if (! $user->admin) accessforbidden(); diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php index 74e4dd6bd4e..65ceb912ea9 100644 --- a/htdocs/admin/dict.php +++ b/htdocs/admin/dict.php @@ -41,6 +41,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php'; if (! empty($conf->accounting->enabled)) require_once DOL_DOCUMENT_ROOT . '/core/class/html.formaccounting.class.php'; +// Load translation files required by the page $langs->loadLangs(array("errors","admin","main","companies","resource","holiday","accountancy","hrm","orders","contracts","projects","propal","bills","interventions")); $action=GETPOST('action','alpha')?GETPOST('action','alpha'):'view'; diff --git a/htdocs/admin/ecm.php b/htdocs/admin/ecm.php index cf1992dce5f..dc2f3e489f7 100644 --- a/htdocs/admin/ecm.php +++ b/htdocs/admin/ecm.php @@ -25,6 +25,7 @@ require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; +// Load translation files required by the page $langs->load("admin"); if (! $user->admin) accessforbidden(); @@ -109,4 +110,4 @@ print ''; print ''; llxFooter(); -$db->close(); \ No newline at end of file +$db->close(); diff --git a/htdocs/admin/events.php b/htdocs/admin/events.php index 6f4dce93e8c..1d1ec548853 100644 --- a/htdocs/admin/events.php +++ b/htdocs/admin/events.php @@ -31,7 +31,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/events.class.php'; if (!$user->admin) accessforbidden(); -// Load traductions files requiredby by page +// Load translation files required by the page $langs->loadLangs(array("users","admin","other")); $action=GETPOST('action','aZ09'); diff --git a/htdocs/admin/expedition.php b/htdocs/admin/expedition.php index 311398a78e1..eb18f904229 100644 --- a/htdocs/admin/expedition.php +++ b/htdocs/admin/expedition.php @@ -34,7 +34,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/expedition.lib.php'; require_once DOL_DOCUMENT_ROOT.'/expedition/class/expedition.class.php'; -// Load traductions files requiredby by page +// Load translation files required by the page $langs->loadLangs(array("admin", "sendings", "deliveries", "other")); if (! $user->admin) diff --git a/htdocs/admin/expedition_extrafields.php b/htdocs/admin/expedition_extrafields.php index a12ed1f9b34..af49e5bf064 100644 --- a/htdocs/admin/expedition_extrafields.php +++ b/htdocs/admin/expedition_extrafields.php @@ -35,10 +35,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; if (!$user->admin) accessforbidden(); -$langs->load("admin"); -$langs->load("other"); -$langs->load("sendings"); -$langs->load("deliveries"); +// Load translation files required by the page +$langs->loadLangs(array('admin', 'other', 'sendings', 'deliveries')); $extrafields = new ExtraFields($db); diff --git a/htdocs/admin/expeditiondet_extrafields.php b/htdocs/admin/expeditiondet_extrafields.php index 073451eba6e..5567e9480e8 100644 --- a/htdocs/admin/expeditiondet_extrafields.php +++ b/htdocs/admin/expeditiondet_extrafields.php @@ -37,9 +37,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; if (!$user->admin) accessforbidden(); -$langs->load("admin"); -$langs->load("other"); -$langs->load("sendings"); +// Load translation files required by the page +$langs->loadLangs(array('admin', 'other', 'sendings')); $extrafields = new ExtraFields($db); $form = new Form($db); diff --git a/htdocs/admin/expensereport.php b/htdocs/admin/expensereport.php index 6d164b25282..1002b146113 100644 --- a/htdocs/admin/expensereport.php +++ b/htdocs/admin/expensereport.php @@ -34,10 +34,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/expensereport.lib.php'; require_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport.class.php'; -$langs->load("admin"); -$langs->load("errors"); -$langs->load("trips"); -$langs->load('other'); +// Load translation files required by the page +$langs->loadLangs(array('admin', 'errors', 'trips', 'other')); if (! $user->admin) accessforbidden(); diff --git a/htdocs/admin/expensereport_extrafields.php b/htdocs/admin/expensereport_extrafields.php index a83c9b04194..8db81edb869 100644 --- a/htdocs/admin/expensereport_extrafields.php +++ b/htdocs/admin/expensereport_extrafields.php @@ -33,10 +33,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; if (!$user->admin) accessforbidden(); -$langs->load("admin"); -$langs->load("errors"); -$langs->load("trips"); -$langs->load('other'); +// Load translation files required by the page +$langs->loadLangs(array('admin', 'errors', 'trips', 'other')); $extrafields = new ExtraFields($db); $form = new Form($db); diff --git a/htdocs/admin/expensereport_ik.php b/htdocs/admin/expensereport_ik.php index bb68ea2182e..db7100d5928 100644 --- a/htdocs/admin/expensereport_ik.php +++ b/htdocs/admin/expensereport_ik.php @@ -30,7 +30,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/expensereport.lib.php'; require_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport.class.php'; require_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport_ik.class.php'; -// Load traductions files requiredby by page +// Load translation files required by the page $langs->loadLangs(array("admin","trips","errors","other","dict")); if (!$user->admin) accessforbidden(); @@ -181,4 +181,4 @@ echo ''; dol_fiche_end(); llxFooter(); -$db->close(); \ No newline at end of file +$db->close(); diff --git a/htdocs/admin/expensereport_rules.php b/htdocs/admin/expensereport_rules.php index ef915e196a2..b1d65b8635b 100644 --- a/htdocs/admin/expensereport_rules.php +++ b/htdocs/admin/expensereport_rules.php @@ -30,7 +30,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/expensereport.lib.php'; require_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport.class.php'; require_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport_rule.class.php'; -// Load traductions files requiredby by page +// Load translation files required by the page $langs->loadLangs(array("admin","other","trips","errors","dict")); if (!$user->admin) accessforbidden(); @@ -356,4 +356,4 @@ echo '