|
#1
|
|||
|
|||
|
PHP Date in Spanish/Italian
My friend runs a business that has clients who speak English, Italian, and Spanish. He wanted to have a PHP date echoed out on his website. The problem is that he needs the day of the week and month to both be echoed out in either Spanish or Italian. Any ideas?
__________________
"We used to dream about this stuff. Now, we get to build it. It's pretty neat." -Steve Jobs, WWDC 2004 Keynote |
|
#2
|
||||
|
||||
|
Does the web site already support multiple languages?
If not, you would need to echo the date to variables then apply Language conditions to translate the days or months. something like: PHP Code:
PHP Code:
or For two dates lines language specific PHP Code:
PHP Code:
PHP Code:
I'm sure there are many other ways.. this was just off the top of my head.
__________________
Scott Moderator : Macintosh : Website & Graphics Adobe Certified Expert: Illustrator Royalty-Free Vector Stock Art |
|
#3
|
||||
|
||||
|
If you use Dreamweaver then here is an extension that may help
http://www.tecnorama.org/document.php?id_doc=47 Otherwise you could create your own function to change the day name http://codewalkers.com/seecode/294.html or you could use setlocale() with strftime() if you have the respective locales installed in your system http://uk.php.net/manual/en/function.strftime.php
__________________
Cheers, Degs Please post back with your results CTH Terms of Use CTH Subscriptions :: Adaware Guide :: HijackThis |
|
#4
|
|||
|
|||
|
Sorry for the delayed response. Thanks for both of your suggestions, my friend used a similar method, but tweaked it a bit. Thanks again!
__________________
"We used to dream about this stuff. Now, we get to build it. It's pretty neat." -Steve Jobs, WWDC 2004 Keynote |
![]() |
| Bookmarks |
«
Previous Topic
|
Next Topic
»
| Topic Tools | |
|
|
All times are GMT +1. The time now is 03:20 AM.
[
RSS ]








