use loadLangs for translation files

This commit is contained in:
Philippe GRAND 2018-03-14 19:10:22 +01:00
parent 8c535db04c
commit a5dc583906
3 changed files with 10 additions and 20 deletions

View File

@ -98,9 +98,8 @@ class pdf_einstein extends ModelePDFCommandes
{ {
global $conf,$langs,$mysoc; global $conf,$langs,$mysoc;
$langs->load("main"); // Translations
$langs->load("bills"); $langs->loadLangs(array("main", "bills", "products"));
$langs->load("products");
$this->db = $db; $this->db = $db;
$this->name = "einstein"; $this->name = "einstein";

View File

@ -4,7 +4,7 @@
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com> * Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr> * Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
* Copyright (C) 2011 Fabrice CHERRIER * Copyright (C) 2011 Fabrice CHERRIER
* Copyright (C) 2013 Philippe Grand <philippe.grand@atoo-net.com> * Copyright (C) 2013-2018 Philippe Grand <philippe.grand@atoo-net.com>
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com> * Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
@ -127,10 +127,8 @@ class pdf_strato extends ModelePDFContract
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO // For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1'; if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1';
$outputlangs->load("main"); // Translations
$outputlangs->load("dict"); $langs->loadLangs(array("main", "dict", "companies", "contracts"));
$outputlangs->load("companies");
$outputlangs->load("contracts");
if ($conf->contrat->dir_output) if ($conf->contrat->dir_output)
{ {

View File

@ -92,15 +92,8 @@ class pdf_merou extends ModelePdfExpedition
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO // For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1'; if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1';
$outputlangs->load("main"); // Translations
$outputlangs->load("dict"); $langs->loadLangs(array("main", "bills", "products", "dict", "companies", "propal", "deliveries", "sendings", "productbatch"));
$outputlangs->load("companies");
$outputlangs->load("bills");
$outputlangs->load("products");
$outputlangs->load("propal");
$outputlangs->load("deliveries");
$outputlangs->load("sendings");
$outputlangs->load("productbatch");
if ($conf->expedition->dir_output) if ($conf->expedition->dir_output)
{ {