hi all,
I have some issue about cakephp 1.2 beta.
I'm working on field date and time and I had problem that I have
solved about date, time and localization
1) I have a date field in my db about a birthdate (in italian
'nascita') of an user. In form registration I have:
<?php echo $form->input('nascita',array('empty' => true,
'label'=>false,'dateFormat'=>'DMY', 'minYear' =>'1910', 'maxYear'
=>'2000', 'div'=>false,'error'=>false,'class'=>'txtfield'));?>
it's work well but my month name was display in english, so jannuary,
febbrary ecc.
For print this in italian language I put at the end of core.php
setlocale(LC_ALL, "it");
so the strftime in form.php when generate the options field generate
the right value (gennaio, febbraio, ecc.) in italian langage.
I'think that is more usefull to put in the realse of core.php a
placeholder for this setting.
2) the nice function in time.php I think is incorrect, I think that
this function don't must use
ret = date("D, M jS Y, H:i", $date);
but use strftime instead, beacuse date function from php manual:
"To format dates in other languages, you should use the setlocale()
and strftime() functions instead of date(). "
infact if I change this function in time.php and set the right
formatted string I can print the rigth language string....
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---