Fix: Translation of month should be ok.
This commit is contained in:
parent
b1165d90fb
commit
e472e6cff8
@ -69,14 +69,12 @@ $var=!$var;
|
||||
print "<tr ".$bc[$var]."><td width=\"300\">".$langs->trans("LanguageParameter","PHP LC_ALL")."</td><td>".setlocale(LC_ALL,0)."</td></tr>\n";
|
||||
$var=!$var;
|
||||
print "<tr ".$bc[$var]."><td width=\"300\">".$langs->trans("LanguageParameter","PHP LC_NUMERIC")."</td><td>".setlocale(LC_NUMERIC,0)."</td></tr>\n";
|
||||
$var=!$var;
|
||||
print "<tr ".$bc[$var]."><td width=\"300\">".$langs->trans("LanguageParameter","PHP LC_TIME")."</td><td>".setlocale(LC_TIME,0)."</td></tr>\n";
|
||||
//$var=!$var;
|
||||
//print "<tr ".$bc[$var]."><td width=\"300\">".$langs->trans("LanguageParameter","PHP LC_MONETARY")."</td><td>".setlocale(LC_MONETARY,0)."</td></tr>\n";
|
||||
$var=!$var;
|
||||
print "<tr ".$bc[$var].'><td width="300">=> price2num(1234.56)</td><td>'.price2num(1233.56+1,'2')."</td></tr>";
|
||||
$var=!$var;
|
||||
print "<tr ".$bc[$var].'><td width="300">=> dolibarr_print_date(0,"dayhourtext")</td><td>'.dolibarr_print_date(0,"dayhourtext")."</td>";
|
||||
print "<tr ".$bc[$var].'><td width="300">=> dol_print_date(0,"dayhourtext")</td><td>'.dol_print_date(0,"dayhourtext")."</td>";
|
||||
// Thousands
|
||||
$var=!$var;
|
||||
$thousand=$langs->trans("SeparatorThousand");
|
||||
|
||||
@ -355,18 +355,18 @@ September=September
|
||||
October=October
|
||||
November=November
|
||||
December=December
|
||||
Month01=jan
|
||||
Month02=feb
|
||||
Month03=mar
|
||||
Month04=apr
|
||||
Month01=january
|
||||
Month02=february
|
||||
Month03=march
|
||||
Month04=april
|
||||
Month05=may
|
||||
Month06=jun
|
||||
Month07=jul
|
||||
Month08=aug
|
||||
Month09=sep
|
||||
Month10=oct
|
||||
Month11=nov
|
||||
Month12=dec
|
||||
Month06=june
|
||||
Month07=july
|
||||
Month08=august
|
||||
Month09=september
|
||||
Month10=october
|
||||
Month11=november
|
||||
Month12=december
|
||||
MonthShort01=jan
|
||||
MonthShort02=feb
|
||||
MonthShort03=mar
|
||||
|
||||
@ -380,8 +380,7 @@ function dolibarr_print_date($time,$format='',$to_gmt=false,$outputlangs='')
|
||||
* "%d/%m/%Y %H:%M:%S",
|
||||
* "day", "daytext", "dayhour", "dayhourldap", "dayhourtext"
|
||||
* \param to_gmt false=output string if for local server TZ users, true=output string is for GMT users
|
||||
* \param outputlangs Object lang that contains charset_output property to define output
|
||||
* This means output is encoded in UTF-8 in default case.
|
||||
* \param outputlangs Object lang that contains language for text translation.
|
||||
* \return string Formated date or '' if time is null
|
||||
*/
|
||||
function dol_print_date($time,$format='',$to_gmt=false,$outputlangs='')
|
||||
@ -442,12 +441,6 @@ function dol_print_date($time,$format='',$to_gmt=false,$outputlangs='')
|
||||
else $ret='Bad value '.$time.' for date';
|
||||
}
|
||||
|
||||
// What is page code of texts from strftime functions ?
|
||||
// $pagecodefrom='ISO-8859-1';
|
||||
// $localtime=setlocale(LC_TIME,0);
|
||||
//print $localtime;
|
||||
// if (eregi('UTF',$localtime)) $pagecodefrom='UTF-8';
|
||||
|
||||
if (! is_object($outputlangs)) $outputlangs=$langs;
|
||||
|
||||
if (eregi('__b__',$format))
|
||||
@ -463,7 +456,6 @@ function dol_print_date($time,$format='',$to_gmt=false,$outputlangs='')
|
||||
//return $ret;
|
||||
}
|
||||
|
||||
// return $outputlangs->convToOutputCharset($ret,$pagecodefrom);
|
||||
return $ret;
|
||||
}
|
||||
|
||||
|
||||
@ -153,8 +153,6 @@ class Translate {
|
||||
|
||||
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_TIME") && MAIN_FORCE_SETLOCALE_LC_TIME)
|
||||
$res_lc_time=setlocale(LC_TIME, MAIN_FORCE_SETLOCALE_LC_TIME.'.UTF-8', MAIN_FORCE_SETLOCALE_LC_TIME);
|
||||
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)
|
||||
|
||||
@ -196,7 +196,6 @@ insert into llx_const (name, value, type, visible) values ('FACTURE_ADDON_PDF',
|
||||
-- Forcer les locales
|
||||
--
|
||||
insert into llx_const (name, value, type, visible, note) VALUES ('MAIN_FORCE_SETLOCALE_LC_ALL', '', 'chaine', 1, 'Pour forcer LC_ALL si pb de locale');
|
||||
insert into llx_const (name, value, type, visible, note) VALUES ('MAIN_FORCE_SETLOCALE_LC_TIME', '', 'chaine', 1, 'Pour forcer LC_TIME si pb de locale');
|
||||
insert into llx_const (name, value, type, visible, note) VALUES ('MAIN_FORCE_SETLOCALE_LC_MONETARY', '', 'chaine', 1, 'Pour forcer LC_MONETARY si pb de locale');
|
||||
insert into llx_const (name, value, type, visible, note) VALUES ('MAIN_FORCE_SETLOCALE_LC_NUMERIC', '', 'chaine', 1, 'Mettre la valeur C si problème de centimes');
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user