diff --git a/htdocs/core/modules/project/mod_project_universal.php b/htdocs/core/modules/project/mod_project_universal.php index 6be53915136..934526f21d0 100644 --- a/htdocs/core/modules/project/mod_project_universal.php +++ b/htdocs/core/modules/project/mod_project_universal.php @@ -45,8 +45,8 @@ class mod_project_universal extends ModeleNumRefProjects { global $conf,$langs; - $langs->load("projects"); - $langs->load("admin"); + // Load translation files required by the page + $langs->loadLangs(array("projects","admin")); $form = new Form($this->db); diff --git a/htdocs/core/modules/project/task/mod_task_universal.php b/htdocs/core/modules/project/task/mod_task_universal.php index cc3175be159..ef3aeee1bcd 100644 --- a/htdocs/core/modules/project/task/mod_task_universal.php +++ b/htdocs/core/modules/project/task/mod_task_universal.php @@ -45,8 +45,8 @@ class mod_task_universal extends ModeleNumRefTask { global $conf,$langs; - $langs->load("projects"); - $langs->load("admin"); + // Load translation files required by the page + $langs->loadLangs(array("projects","admin")); $form = new Form($this->db); diff --git a/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php b/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php index 1e0d084fbba..4a2a3055119 100644 --- a/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php +++ b/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php @@ -52,8 +52,8 @@ class doc_generic_proposal_odt extends ModelePDFPropales { global $conf,$langs,$mysoc; - $langs->load("main"); - $langs->load("companies"); + // Load translation files required by the page + $langs->loadLangs(array("main","companies")); $this->db = $db; $this->name = "ODT templates"; @@ -97,8 +97,8 @@ class doc_generic_proposal_odt extends ModelePDFPropales { global $conf,$langs; - $langs->load("companies"); - $langs->load("errors"); + // Load translation files required by the page + $langs->loadLangs(array("errors","companies")); $form = new Form($this->db); diff --git a/htdocs/core/modules/rapport/pdf_paiement.class.php b/htdocs/core/modules/rapport/pdf_paiement.class.php index 801b3820bc5..4d9f9fc3ff7 100644 --- a/htdocs/core/modules/rapport/pdf_paiement.class.php +++ b/htdocs/core/modules/rapport/pdf_paiement.class.php @@ -40,9 +40,9 @@ class pdf_paiement function __construct($db) { global $langs,$conf; - $langs->load("bills"); - $langs->load("compta"); - $langs->load("main"); + + // Load translation files required by the page + $langs->loadLangs(array("bills","compta","main")); $this->db = $db; $this->description = $langs->transnoentities("ListOfCustomerPayments"); diff --git a/htdocs/core/modules/societe/doc/doc_generic_odt.modules.php b/htdocs/core/modules/societe/doc/doc_generic_odt.modules.php index 285b7b2db82..a0be3ce8e81 100644 --- a/htdocs/core/modules/societe/doc/doc_generic_odt.modules.php +++ b/htdocs/core/modules/societe/doc/doc_generic_odt.modules.php @@ -48,8 +48,8 @@ class doc_generic_odt extends ModeleThirdPartyDoc { global $conf,$langs,$mysoc; - $langs->load("main"); - $langs->load("companies"); + // Load translation files required by the page + $langs->loadLangs(array("main","companies")); $this->db = $db; $this->name = "ODT templates"; diff --git a/htdocs/core/modules/stock/doc/doc_generic_stock_odt.modules.php b/htdocs/core/modules/stock/doc/doc_generic_stock_odt.modules.php index 20957f26415..e99bc45bcac 100644 --- a/htdocs/core/modules/stock/doc/doc_generic_stock_odt.modules.php +++ b/htdocs/core/modules/stock/doc/doc_generic_stock_odt.modules.php @@ -51,8 +51,8 @@ class doc_generic_stock_odt extends ModelePDFStock { global $conf,$langs,$mysoc; - $langs->load("main"); - $langs->load("companies"); + // Load translation files required by the page + $langs->loadLangs(array("main","companies")); $this->db = $db; $this->name = "ODT templates"; diff --git a/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_tulip.php b/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_tulip.php index 2e155c04df8..9f4a5b6bbe7 100644 --- a/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_tulip.php +++ b/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_tulip.php @@ -2,7 +2,7 @@ /* Copyright (C) 2003-2007 Rodolphe Quiedeville * Copyright (C) 2004-2008 Laurent Destailleur * Copyright (C) 2005-2009 Regis Houssin - * Copyright (C) 2013 Philippe Grand + * Copyright (C) 2013-2018 Philippe Grand * Copyright (C) 2013 Juanjo Menent * Copyright (C) 2016 Alexandre Spangaro * @@ -50,8 +50,8 @@ class mod_facture_fournisseur_tulip extends ModeleNumRefSuppliersInvoices { global $conf,$langs; - $langs->load("bills"); - $langs->load("admin"); + // Load translation files required by the page + $langs->loadLangs(array("bills","admin")); $form = new Form($this->db);