Re: numeric to day name in various languaes
| From: | Marek Kilimajer | Date: | Thu, 18 Mar 2004 13:29:46 +0000 |
| Subject: | Re: numeric to day name in various languaes | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-180814@lists.php.net to get a copy of this message | ||
Diana Castillo wrote:
Is there anything built into php that would do something like this , but in all of the possible languages? What do you want to do? Do you want to assign $restriction_day a list of weekday in ALL 6000+ languages? :-)Why don't you keep $restriction_day numeric and display the weekday name once it's output to the browser?
switch ($restriction_week_days) { case "1": $restriction_day = "Monday,Lunes,Lundi"; break; case "2": $restriction_day = "Tuesday,Martes,Mardi"; break; case "3": $restriction_day = "Wednesday,Miercoles, Mercredi"; break; case "4": $restriction_day = "Thursday , Jueves, Jeudi"; break; case "5": $restriction_day = "Friday, Viernes,Vendredi"; break; case "6": $restriction_day = "Saturday, Sabado, Samedi"; break; case "7": $restriction_day = "Sunday, Domingo, Dimanche"; break; -- Diana Castillo Global Reservas, S.L. C/Granvia 22 dcdo 4-dcha 28013 Madrid-Spain Tel : 00-34-913604039 ext 214 Fax : 00-34-915228673 email: diana@hotelkey.com Web : http://www.hotelkey.comhttp://www.destinia.com