diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php index 73d1c9be4a8..d076e35f987 100644 --- a/htdocs/admin/dict.php +++ b/htdocs/admin/dict.php @@ -31,7 +31,6 @@ require("./pre.inc.php"); -$langs->load("main"); $langs->load("other"); $langs->load("admin"); $langs->load("companies"); diff --git a/htdocs/compta/facture/impayees.php b/htdocs/compta/facture/impayees.php index 0b1c46eff97..e9694f720b9 100644 --- a/htdocs/compta/facture/impayees.php +++ b/htdocs/compta/facture/impayees.php @@ -38,7 +38,6 @@ $user->getrights('banque'); if (!$user->rights->facture->lire) accessforbidden(); -$langs->load("main"); // BUG De chargement de traduction ne pas modifier cette ligne $langs->load("bills"); diff --git a/htdocs/fourn/facture/impayees.php b/htdocs/fourn/facture/impayees.php index 9cdb3ed50e2..118905daa04 100644 --- a/htdocs/fourn/facture/impayees.php +++ b/htdocs/fourn/facture/impayees.php @@ -38,7 +38,6 @@ $user->getrights('banque'); if (!$user->rights->facture->lire) accessforbidden(); -$langs->load("main"); // BUG De chargement de traduction ne pas modifier cette ligne $langs->load("companies"); $langs->load("bills"); diff --git a/htdocs/lib/datepicker.php b/htdocs/lib/datepicker.php index fbc79b65e4d..691410996a9 100644 --- a/htdocs/lib/datepicker.php +++ b/htdocs/lib/datepicker.php @@ -71,7 +71,6 @@ function xyzToUnixTimestamp($mysqldate){ function displayBox($selectedDate,$month,$year){ global $dolibarr_main_url_root,$langs,$conf; - $langs->load("main"); //print "$selectedDate,$month,$year"; $thedate=dolibarr_mktime(0,0,0,$month,1,$year); diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index bb4cecb1168..d7a3abc2c13 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -577,8 +577,9 @@ if (! defined('MAIN_INFO_SOCIETE_PAYS')) define('MAIN_INFO_SOCIETE_PAYS','1'); } -// On charge le fichier lang principal +// On charge les fichiers lang principaux $langs->load("main"); +$langs->load("dict"); /* * @@ -625,90 +626,88 @@ else */ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0) { - global $user, $conf, $langs, $db, $micro_start_time; - - $langs->load("dict"); - + global $user, $conf, $langs, $db, $micro_start_time; + // Pour le tuning optionnel. Activer si la variable d'environnement DOL_TUNING // est positionne A appeler avant tout. if (isset($_SERVER['DOL_TUNING'])) $micro_start_time=dol_microtime_float(true); if (! $conf->css) $conf->css ='/theme/eldy/eldy.css.php'; - //header("Content-type: text/html; charset=UTF-8"); - header("Content-type: text/html; charset=".$conf->character_set_client); + //header("Content-type: text/html; charset=UTF-8"); + header("Content-type: text/html; charset=".$conf->character_set_client); - print ''; + print ''; //print ''; - print "\n"; + print "\n"; print "\n"; if ($disablehead == 0) { print "
\n"; - - print $langs->lang_header(); - print $head; + + print $langs->lang_header(); + print $head; - // Affiche meta - print ''."\n"; // Evite indexation par robots - print ''."\n"; + // Affiche meta + print ''."\n"; // Evite indexation par robots + print ''."\n"; - // Affiche title - if ($title) - { - print '