Qual: Removed deprecated source code

This commit is contained in:
Laurent Destailleur 2009-06-10 19:51:00 +00:00
parent a532590032
commit 7b68ed8cd5
22 changed files with 50 additions and 130 deletions

View File

@ -84,8 +84,6 @@ class CommActionRapport
$outputlangs->load("bills");
$outputlangs->load("products");
$outputlangs->setPhpLang();
$dir = $conf->agenda->dir_temp."/";
$file = $dir . "actions-".$this->month."-".$this->year.".pdf";

View File

@ -67,7 +67,7 @@ class BordereauChequeBlochet extends FPDF
// Recupere emmetteur
$this->emetteur=$mysoc;
if (! $this->emetteur->pays_code) $this->emetteur->pays_code=substr($langs->defaultlang,-2); // Par defaut, si n'était pas défini
if (! $this->emetteur->pays_code) $this->emetteur->pays_code=substr($langs->defaultlang,-2); // Par defaut, si n'<EFBFBD>tait pas d<>fini
// Defini position des colonnes
$this->line_height = 5;
@ -95,8 +95,6 @@ class BordereauChequeBlochet extends FPDF
$outputlangs->load("bills");
$outputlangs->load("products");
$outputlangs->setPhpLang();
$dir = $_dir . "/".get_exdir($number);
if (! is_dir($dir))
@ -156,13 +154,12 @@ class BordereauChequeBlochet extends FPDF
if (! empty($conf->global->MAIN_UMASK))
@chmod($file, octdec($conf->global->MAIN_UMASK));
$langs->setPhpLang(); // On restaure langue session
return 1; // Pas d'erreur
}
/**
* \brief Renvoi le dernier message d'erreur de création de propale
* \brief Renvoi le dernier message d'erreur de cr<EFBFBD>ation de propale
*/
function pdferror()
{

View File

@ -114,8 +114,6 @@ class pdf_edison extends ModelePDFCommandes
$outputlangs->load("products");
$outputlangs->load("orders");
$outputlangs->setPhpLang();
// Definition de l'objet $com (pour compatibilite ascendante)
if (! is_object($com))
{
@ -144,7 +142,6 @@ class pdf_edison extends ModelePDFCommandes
if (create_exdir($dir) < 0)
{
$this->error=$langs->transnoentities("ErrorCanNotCreateDir",$dir);
$langs->setPhpLang(); // On restaure langue session
return 0;
}
}
@ -303,19 +300,16 @@ class pdf_edison extends ModelePDFCommandes
if (! empty($conf->global->MAIN_UMASK))
@chmod($file, octdec($conf->global->MAIN_UMASK));
$langs->setPhpLang(); // On restaure langue session
return 1;
}
}
else
{
$this->error=$langs->transnoentities("ErrorConstantNotDefined","COMMANDE_OUTPUTDIR");
$langs->setPhpLang(); // On restaure langue session
return 0;
}
$this->error=$langs->transnoentities("ErrorUnknown");
$langs->setPhpLang(); // On restaure langue session
return 0; // Erreur par defaut
}

View File

@ -119,8 +119,6 @@ class pdf_einstein extends ModelePDFCommandes
$outputlangs->load("products");
$outputlangs->load("orders");
$outputlangs->setPhpLang();
if ($conf->commande->dir_output)
{
// Definition de l'objet $com (pour compatibilite ascendante)
@ -368,24 +366,20 @@ class pdf_einstein extends ModelePDFCommandes
if (! empty($conf->global->MAIN_UMASK))
@chmod($file, octdec($conf->global->MAIN_UMASK));
$langs->setPhpLang(); // On restaure langue session
return 1; // Pas d'erreur
}
else
{
$this->error=$langs->trans("ErrorCanNotCreateDir",$dir);
$langs->setPhpLang(); // On restaure langue session
return 0;
}
}
else
{
$this->error=$langs->trans("ErrorConstantNotDefined","COMMANDE_OUTPUTDIR");
$langs->setPhpLang(); // On restaure langue session
return 0;
}
$this->error=$langs->trans("ErrorUnknown");
$langs->setPhpLang(); // On restaure langue session
return 0; // Erreur par defaut
}

View File

@ -156,18 +156,15 @@ class html_cerfafr extends ModeleDon
else
{
$this->error=$langs->trans("ErrorCanNotCreateDir",$dir);
$langs->setPhpLang(); // On restaure langue session
return 0;
}
}
else
{
$this->error=$langs->trans("ErrorConstantNotDefined","DON_OUTPUTDIR");
$langs->setPhpLang(); // On restaure langue session
return 0;
}
$this->error=$langs->trans("ErrorUnknown");
$langs->setPhpLang(); // On restaure langue session
return 0; // Erreur par defaut
}

View File

@ -90,8 +90,6 @@ Class pdf_expedition_merou extends ModelePdfExpedition
$outputlangs->load("propal");
$outputlangs->load("sendings");
$outputlangs->setPhpLang();
//Generation de la fiche
$this->expe = $object;
@ -252,24 +250,20 @@ Class pdf_expedition_merou extends ModelePdfExpedition
$pdf->Output($file);
$langs->setPhpLang(); // On restaure langue session
return 1;
}
else
{
$this->error=$outputlangs->transnoentities("ErrorCanNotCreateDir",$dir);
$langs->setPhpLang(); // On restaure langue session
return 0;
}
}
else
{
$this->error=$outputlangs->transnoentities("ErrorConstantNotDefined","EXP_OUTPUTDIR");
$langs->setPhpLang(); // On restaure langue session
return 0;
}
$this->error=$outputlangs->transnoentities("ErrorUnknown");
$langs->setPhpLang(); // On restaure langue session
return 0; // Erreur par defaut
}

View File

@ -163,8 +163,6 @@ Class pdf_expedition_rouget extends ModelePdfExpedition
$outputlangs->load("products");
$outputlangs->load("propal");
$outputlangs->setPhpLang();
if ($conf->expedition_bon->dir_output)
{
// Definition de $dir et $file
@ -279,24 +277,20 @@ Class pdf_expedition_rouget extends ModelePdfExpedition
if (! empty($conf->global->MAIN_UMASK))
@chmod($file, octdec($conf->global->MAIN_UMASK));
$langs->setPhpLang(); // On restaure langue session
return 1;
}
else
{
$this->error=$langs->transnoentities("ErrorCanNotCreateDir",$dir);
$langs->setPhpLang(); // On restaure langue session
return 0;
}
}
else
{
$this->error=$langs->transnoentities("ErrorConstantNotDefined","EXP_OUTPUTDIR");
$langs->setPhpLang(); // On restaure langue session
return 0;
}
$this->error=$langs->transnoentities("ErrorUnknown");
$langs->setPhpLang(); // On restaure langue session
return 0; // Erreur par defaut
}

View File

@ -120,8 +120,6 @@ class pdf_crabe extends ModelePDFFactures
$outputlangs->load("bills");
$outputlangs->load("products");
$outputlangs->setPhpLang();
if ($conf->facture->dir_output)
{
// Definition de l'objet $fac (pour compatibilite ascendante)
@ -381,24 +379,20 @@ class pdf_crabe extends ModelePDFFactures
if (! empty($conf->global->MAIN_UMASK))
@chmod($file, octdec($conf->global->MAIN_UMASK));
$langs->setPhpLang(); // On restaure langue session
return 1; // Pas d'erreur
}
else
{
$this->error=$langs->trans("ErrorCanNotCreateDir",$dir);
$langs->setPhpLang(); // On restaure langue session
return 0;
}
}
else
{
$this->error=$langs->trans("ErrorConstantNotDefined","FAC_OUTPUTDIR");
$langs->setPhpLang(); // On restaure langue session
return 0;
}
$this->error=$langs->trans("ErrorUnknown");
$langs->setPhpLang(); // On restaure langue session
return 0; // Erreur par defaut
}

View File

@ -120,8 +120,6 @@ class pdf_oursin extends ModelePDFFactures
$outputlangs->load("bills");
$outputlangs->load("products");
$outputlangs->setPhpLang();
if ($conf->facture->dir_output)
{
// Definition de l'objet $fac (pour compatibilite ascendante)
@ -155,7 +153,6 @@ class pdf_oursin extends ModelePDFFactures
if (create_exdir($dir) < 0)
{
$this->error=$langs->transnoentities("ErrorCanNotCreateDir",$dir);
$langs->setPhpLang(); // On restaure langue session
return 0;
}
}
@ -293,24 +290,20 @@ class pdf_oursin extends ModelePDFFactures
if (! empty($conf->global->MAIN_UMASK))
@chmod($file, octdec($conf->global->MAIN_UMASK));
$langs->setPhpLang(); // On restaure langue session
return 1; // Pas d'erreur
}
else
{
$this->error=$langs->transnoentities("ErrorCanNotCreateDir",$dir);
$langs->setPhpLang(); // On restaure langue session
return 0;
}
}
else
{
$this->error=$langs->transnoentities("ErrorConstantNotDefined","FAC_OUTPUTDIR");
$langs->setPhpLang(); // On restaure langue session
return 0;
}
$this->error=$langs->transnoentities("ErrorUnknown");
$langs->setPhpLang(); // On restaure langue session
return 0; // Erreur par defaut
}

View File

@ -92,8 +92,6 @@ class pdf_soleil extends ModelePDFFicheinter
$outputlangs->load("companies");
$outputlangs->load("interventions");
$outputlangs->setPhpLang();
if ($conf->ficheinter->dir_output)
{
// If $fichinter is id instead of object
@ -328,7 +326,6 @@ class pdf_soleil extends ModelePDFFicheinter
if (! empty($conf->global->MAIN_UMASK))
@chmod($file, octdec($conf->global->MAIN_UMASK));
$langs->setPhpLang(); // On restaure langue session
return 1;
}
else

View File

@ -104,8 +104,6 @@ class pdf_sirocco extends ModelePDFDeliveryOrder
$outputlangs->load("deliveries");
$outputlangs->load("sendings");
$outputlangs->setPhpLang();
if ($conf->livraison_bon->dir_output)
{
// If $object is id instead of object

View File

@ -125,8 +125,6 @@ class pdf_typhon extends ModelePDFDeliveryOrder
$outputlangs->load("deliveries");
$outputlangs->load("sendings");
$outputlangs->setPhpLang();
if ($conf->livraison_bon->dir_output)
{
// If $delivery is id instead of object

View File

@ -29,12 +29,12 @@
////////////////////////////////////////////////////
// PDF_Label
//
// Classe afin d'éditer au format PDF des étiquettes
// au format Avery ou personnalisé
// Classe afin d'<EFBFBD>diter au format PDF des <20>tiquettes
// au format Avery ou personnalis<EFBFBD>
//
//
// Copyright (C) 2003 Laurent PASSEBECQ (LPA)
// Basé sur les fonctions de Steve Dillon : steved@mad.scientist.com
// Bas<EFBFBD> sur les fonctions de Steve Dillon : steved@mad.scientist.com
//
//-------------------------------------------------------------------
// VERSIONS :
@ -56,7 +56,7 @@
/**
\file htdocs/adherents/cartes/PDF_card.class.php
\ingroup adherent
\brief Fichier de la classe permettant d'éditer au format PDF des étiquettes au format Avery ou personnalisé
\brief Fichier de la classe permettant d'<EFBFBD>diter au format PDF des <EFBFBD>tiquettes au format Avery ou personnalis<EFBFBD>
\author Steve Dillon
\author Laurent Passebecq
\author Rodolphe Quiedville
@ -70,22 +70,22 @@ require_once(DOL_DOCUMENT_ROOT.'/includes/fpdf/fpdfi/fpdi_protection.php');
/**
\class PDF_card
\brief Classe afin d'éditer au format PDF des étiquettes au format Avery ou personnalisé
\brief Classe afin d'<EFBFBD>diter au format PDF des <EFBFBD>tiquettes au format Avery ou personnalis<EFBFBD>
*/
class PDF_card extends FPDF {
// Propriétés privées
var $_Avery_Name = ''; // Nom du format de l'étiquette
var $_Margin_Left = 0; // Marge de gauche de l'étiquette
var $_Margin_Top = 0; // marge en haut de la page avant la première étiquette
var $_X_Space = 0; // Espace horizontal entre 2 bandes d'étiquettes
var $_Y_Space = 0; // Espace vertical entre 2 bandes d'étiquettes
var $_X_Number = 0; // Nombre d'étiquettes sur la largeur de la page
var $_Y_Number = 0; // Nombre d'étiquettes sur la hauteur de la page
var $_Width = 0; // Largeur de chaque étiquette
var $_Height = 0; // Hauteur de chaque étiquette
var $_Char_Size = 10; // Hauteur des caractères
var $_Line_Height = 10; // Hauteur par défaut d'une ligne
// Propri<EFBFBD>t<EFBFBD>s priv<69>es
var $_Avery_Name = ''; // Nom du format de l'<EFBFBD>tiquette
var $_Margin_Left = 0; // Marge de gauche de l'<EFBFBD>tiquette
var $_Margin_Top = 0; // marge en haut de la page avant la premi<EFBFBD>re <20>tiquette
var $_X_Space = 0; // Espace horizontal entre 2 bandes d'<EFBFBD>tiquettes
var $_Y_Space = 0; // Espace vertical entre 2 bandes d'<EFBFBD>tiquettes
var $_X_Number = 0; // Nombre d'<EFBFBD>tiquettes sur la largeur de la page
var $_Y_Number = 0; // Nombre d'<EFBFBD>tiquettes sur la hauteur de la page
var $_Width = 0; // Largeur de chaque <EFBFBD>tiquette
var $_Height = 0; // Hauteur de chaque <EFBFBD>tiquette
var $_Char_Size = 10; // Hauteur des caract<EFBFBD>res
var $_Line_Height = 10; // Hauteur par d<EFBFBD>faut d'une ligne
var $_Metric = 'mm'; // Type of metric.. Will help to calculate good values
var $_Metric_Doc = 'mm'; // Type of metric for the doc..
@ -227,7 +227,7 @@ class PDF_card extends FPDF {
$this->SetAutoPageBreak(false);
$this->_Metric_Doc = $unit;
// Permet de commencer l'impression à l'étiquette désirée dans le cas où la page a déjà servie
// Permet de commencer l'impression <EFBFBD> l'<27>tiquette d<>sir<69>e dans le cas o<> la page a d<>j<EFBFBD> servie
if ($posX > 0) $posX--; else $posX=0;
if ($posY > 0) $posY--; else $posY=0;
$this->_COUNTX = $posX;
@ -236,7 +236,7 @@ class PDF_card extends FPDF {
}
//Méthode qui permet de modifier la taille des caractères
//M<EFBFBD>thode qui permet de modifier la taille des caract<63>res
// Cela modiera aussi l'espace entre chaque ligne
function Set_Char_Size($pt) {
if ($pt > 3) {
@ -247,7 +247,7 @@ class PDF_card extends FPDF {
}
// On imprime une étiqette
// On imprime une <EFBFBD>tiqette
function Add_PDF_card($texte,$header='',$footer='',$outputlangs)
{
global $langs;
@ -261,8 +261,6 @@ class PDF_card extends FPDF {
$outputlangs->load("companies");
$outputlangs->load("members");
// $outputlangs->setPhpLang();
// We are in a new page, then we must add a page
if (($this->_COUNTX ==0) and ($this->_COUNTY==0) and (!$this->_First==1)) {
$this->AddPage();
@ -317,8 +315,6 @@ class PDF_card extends FPDF {
$this->_COUNTX=0;
$this->_COUNTY=0;
}
// $langs->setPhpLang(); // On restaure langue session
}
@ -390,7 +386,7 @@ class PDF_card extends FPDF {
// Give the height for a char size given.
function _Get_Height_Chars($pt) {
// Tableau de concordance entre la hauteur des caractères et de l'espacement entre les lignes
// Tableau de concordance entre la hauteur des caract<EFBFBD>res et de l'espacement entre les lignes
$_Table_Hauteur_Chars = array(6=>2, 7=>2.5, 8=>3, 9=>4, 10=>5, 11=>6, 12=>7, 13=>8, 14=>9, 15=>10);
if (in_array($pt, array_keys($_Table_Hauteur_Chars))) {
return $_Table_Hauteur_Chars[$pt];

View File

@ -121,8 +121,6 @@ class pdf_propale_azur extends ModelePDFPropales
$outputlangs->load("propal");
$outputlangs->load("products");
$outputlangs->setPhpLang();
if ($conf->propale->dir_output)
{
// Définition de l'objet $propale (pour compatibilite ascendante)
@ -262,7 +260,7 @@ class pdf_propale_azur extends ModelePDFPropales
$pdf->SetXY ($this->posxtva, $curY);
$pdf->MultiCell($this->posxup-$this->posxtva-1, 4, vatrate($propale->lignes[$i]->tva_tx,1,$propale->lignes[$i]->info_bits), 0, 'R');
}
// Prix unitaire HT avant remise
$pdf->SetXY ($this->posxup, $curY);
$pdf->MultiCell($this->posxqty-$this->posxup-1, 4, price($propale->lignes[$i]->subprice), 0, 'R', 0);
@ -392,25 +390,21 @@ class pdf_propale_azur extends ModelePDFPropales
//$pdfConcat->Output($file);
$outputlangs->charset_output=$sav_charset_output;
$langs->setPhpLang(); // On restaure langue session
return 1; // Pas d'erreur
}
else
{
$this->error=$langs->trans("ErrorCanNotCreateDir",$dir);
$langs->setPhpLang(); // On restaure langue session
return 0;
}
}
else
{
$this->error=$langs->trans("ErrorConstantNotDefined","PROP_OUTPUTDIR");
$langs->setPhpLang(); // On restaure langue session
return 0;
}
$this->error=$langs->trans("ErrorUnknown");
$langs->setPhpLang(); // On restaure langue session
return 0; // Erreur par defaut
}
@ -569,7 +563,7 @@ class pdf_propale_azur extends ModelePDFPropales
function _tableau_tot(&$pdf, $object, $deja_regle, $posy, $outputlangs)
{
global $conf;
$tab2_top = $posy;
$tab2_hl = 5;
$tab2_height = $tab2_hl * 4;
@ -590,7 +584,7 @@ class pdf_propale_azur extends ModelePDFPropales
// Show VAT by rates and total
$pdf->SetFillColor(248,248,248);
$this->atleastoneratenotnull=0;
if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT))
{
@ -599,10 +593,10 @@ class pdf_propale_azur extends ModelePDFPropales
if ($tvakey) // On affiche pas taux 0
{
$this->atleastoneratenotnull++;
$index++;
$pdf->SetXY ($col1x, $tab2_top + $tab2_hl * $index);
$tvacompl='';
if (eregi('\*',$tvakey))
{
@ -612,7 +606,7 @@ class pdf_propale_azur extends ModelePDFPropales
$totalvat =$outputlangs->transnoentities("TotalVAT").' ';
$totalvat.=vatrate($tvakey,1).$tvacompl;
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1);
$pdf->SetXY ($col2x, $tab2_top + $tab2_hl * $index);
$pdf->MultiCell($largcol2, $tab2_hl, price($tvaval), 0, 'R', 1);
}
@ -623,12 +617,12 @@ class pdf_propale_azur extends ModelePDFPropales
$index++;
$pdf->SetXY ($col1x, $tab2_top + $tab2_hl * $index);
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("TotalVAT"), 0, 'L', 1);
$pdf->SetXY ($col2x, $tab2_top + $tab2_hl * $index);
$pdf->MultiCell($largcol2, $tab2_hl, price($object->total_tva), 0, 'R', 1);
}
}
$useborder=0;
// Total TTC
@ -639,12 +633,12 @@ class pdf_propale_azur extends ModelePDFPropales
$pdf->SetTextColor(0,0,60);
$pdf->SetFillColor(224,224,224);
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("TotalTTC"), $useborder, 'L', 1);
$pdf->SetXY ($col2x, $tab2_top + $tab2_hl * $index);
$pdf->MultiCell($largcol2, $tab2_hl, price($object->total_ttc), $useborder, 'R', 1);
$pdf->SetTextColor(0,0,0);
}
if ($deja_regle > 0)
{
$index++;
@ -722,7 +716,7 @@ class pdf_propale_azur extends ModelePDFPropales
$pdf->SetXY ($this->posxtva-1, $tab_top+2);
$pdf->MultiCell($this->posxup-$this->posxtva-1,2, $outputlangs->transnoentities("VAT"),'','C');
}
$pdf->line($this->posxup-1, $tab_top, $this->posxup-1, $tab_top + $tab_height);
$pdf->SetXY ($this->posxup-1, $tab_top+2);
$pdf->MultiCell(18,2, $outputlangs->transnoentities("PriceUHT"),'','C');

View File

@ -105,8 +105,6 @@ class pdf_propale_jaune extends ModelePDFPropales
$outputlangs->load("propal");
$outputlangs->load("products");
$outputlangs->setPhpLang();
if ($conf->propale->dir_output)
{
// D<>finition de l'objet $propal (pour compatibilite ascendante)
@ -302,7 +300,6 @@ class pdf_propale_jaune extends ModelePDFPropales
if (! empty($conf->global->MAIN_UMASK))
@chmod($file, octdec($conf->global->MAIN_UMASK));
$langs->setPhpLang(); // On restaure langue session
return 1;
}
}

View File

@ -81,8 +81,6 @@ class pdf_paiement extends FPDF
// Force output charset to ISO, because FPDF expect text to be encoded in ISO
$outputlangs->charset_output='ISO-8859-1';
$outputlangs->setPhpLang();
$this->month=$month;
$this->year=$year;
@ -206,7 +204,6 @@ class pdf_paiement extends FPDF
if (! empty($conf->global->MAIN_UMASK))
@chmod($file, octdec($conf->global->MAIN_UMASK));
$langs->setPhpLang(); // On restaure langue session
return 1;
}

View File

@ -121,8 +121,6 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
$outputlangs->load("products");
$outputlangs->load("orders");
$outputlangs->setPhpLang();
if ($conf->fournisseur->commande->dir_output)
{
// Definition de l'objet $com (pour compatibilite ascendante)

View File

@ -178,7 +178,6 @@ if (function_exists('get_magic_quotes_gpc')) // magic_quotes_* plus pris en comp
// Defini objet langs
$langs = new Translate('..',$conf);
$langs->setDefaultLang('auto');
$langs->setPhpLang();
$bc[false]=' class="bg1"';
$bc[true]=' class="bg2"';

View File

@ -526,14 +526,12 @@ if (empty($_GET["lang"])) // If language was not forced on URL
if ($langs->getDefaultLang() != $user->conf->MAIN_LANG_DEFAULT)
{
$langs->setDefaultLang($user->conf->MAIN_LANG_DEFAULT);
$langs->setPhpLang();
}
}
}
else // If language was forced on URL
{
$langs->setDefaultLang($_GET["lang"]);
$langs->setPhpLang();
}

View File

@ -306,7 +306,6 @@ if (! defined('NOREQUIREDB') && ! defined('NOREQUIRESOC'))
if (! defined('NOREQUIRETRAN'))
{
$langs->setDefaultLang($conf->global->MAIN_LANG_DEFAULT);
$langs->setPhpLang();
}
/*

View File

@ -141,7 +141,6 @@ if (function_exists('get_magic_quotes_gpc')) // magic_quotes_* plus pris en comp
$langs = new Translate('..',$conf);
if (isset($_GET["lang"])) $langs->setDefaultLang($_GET["lang"]);
else $langs->setDefaultLang('auto');
$langs->setPhpLang();
$bc[false]=' class="bg1"';
$bc[true]=' class="bg2"';

View File

@ -82,7 +82,7 @@ class Translate {
}
/**
* \brief Positionne la chaine traduite pour une cl<EFBFBD> donn<EFBFBD>e.
* \brief Positionne la chaine traduite pour une cle donnee.
* \param key Key to translate
* \return string Translated string
*/
@ -143,30 +143,12 @@ class Translate {
/**
\brief Positionne environnement PHP en fonction du langage
\remarks Le code langue long (fr_FR, en_US, ...) doit avoir etre positionne par setDefaultLang
\return int >0 si ok, <0 so ko
\deprecated
* \brief Deprecated function. Do nothing. Kept for backward compatibility.
* \deprecated
*/
function setPhpLang()
{
//dol_syslog("Translate::setPhpLang ".$this->defaultlang,LOG_DEBUG);
return;
/*
$code_lang_tiret=ereg_replace('_','-',$this->defaultlang);
//print 'code_lang_tiret='.$code_lang_tiret;
setlocale(LC_ALL, $this->defaultlang); // Some OS (Windows) need local with _
setlocale(LC_ALL, $code_lang_tiret); // Other OS need local with -
if (defined("MAIN_FORCE_SETLOCALE_LC_ALL") && MAIN_FORCE_SETLOCALE_LC_ALL)
$res_lc_all=setlocale(LC_ALL, MAIN_FORCE_SETLOCALE_LC_ALL.'.UTF-8', MAIN_FORCE_SETLOCALE_LC_ALL);
if (defined("MAIN_FORCE_SETLOCALE_LC_NUMERIC") && MAIN_FORCE_SETLOCALE_LC_NUMERIC)
$res_lc_numeric=setlocale(LC_NUMERIC, MAIN_FORCE_SETLOCALE_LC_NUMERIC.'.UTF-8', MAIN_FORCE_SETLOCALE_LC_NUMERIC);
if (defined("MAIN_FORCE_SETLOCALE_LC_MONETARY") && MAIN_FORCE_SETLOCALE_LC_MONETARY)
$res_lc_monetary=setlocale(LC_MONETARY, MAIN_FORCE_SETLOCALE_LC_MONETARY.'UTF-8', MAIN_FORCE_SETLOCALE_LC_MONETARY);
//print 'x'.$res_lc_all;
return 1;
*/
}
@ -182,6 +164,7 @@ class Translate {
*/
function Load($domain,$alt=0)
{
global $conf;
//dol_syslog("Translate::Load domain=".$domain." alt=".$alt);
// Check parameters
@ -305,6 +288,18 @@ class Translate {
}
}
// Format for date
/* TODO If lang file is main, we modify the format constants
$this->format_date_short="%d/%m/%Y"; # Format of day with PHP/C tags (strftime functions)
$this->format_date_short_java="dd/MM/yyyy"; # Format of day with Java tags
$this->format_hour_short="%H:%M";
$this->format_date_text_short="%d %b %Y";
$this->format_date_text="%d %B %Y";
$this->format_date_hour_short="%d/%m/%Y %H:%M";
$this->format_date_hour_text_short="%d %b %Y %H:%M";
$this->format_date_hour_text="%d %B %Y %H:%M";
*/
if (empty($this->tab_loaded[$domain])) $this->tab_loaded[$domain]=2; // Marque ce fichier comme non trouve
return 1;