Welcome Guest ( Log In | Register)



 
Reply to this topicStart new topic
> Multilingual Possibilities In Php, Date format in different languages
mrdee
post Nov 8 2007, 07:03 PM
Post #1


Super Member
*********

Group: [HOSTED]
Posts: 295
Joined: 18-July 07
From: Slough (UK)
Member No.: 46,682



Hi,
I was wondering if there is a possibility in the PHP Date function to let it display the date in other languages (probably not, but I thought I'd ask).
I know that 'D' gives you 'Sun', 'Mon', etc. and 'l' gives you 'Sunday', 'Monday', etc.

Is there any provision for letting it display something like eg. 'Zon', 'Maa', etc., or 'Zondag', 'Maandag' etc. ?
It would be handy for people (like me) who have a multilingual web site.

Thanks in advance.
Go to the top of the page
 
+Quote Post
sonesay
post Nov 8 2007, 09:23 PM
Post #2


|||[ n00b King ]|||
*********

Group: [HOSTED]
Posts: 715
Joined: 20-June 07
From: Auckland
Member No.: 45,102
myCENT:20.20



I dont remember php date function having multi language abilties but I may be wrong not 100% sure. If it doesnt and you really want to use it you could probably write a function to do the translation but depending on how well its writting updating and making further changes could be alot of hassle.

On your other post I updated my replay on it did you get past that point?

cheers.

update:
CODE
$day = date("D");

if($day == "Mon") {
$day = "Zon";
}
else if($day == "Tue") {
$day = "Maa";
}


then use it later in your output.



This post has been edited by sonesay: Nov 8 2007, 09:29 PM
Go to the top of the page
 
+Quote Post
mrdee
post Nov 8 2007, 10:42 PM
Post #3


Super Member
*********

Group: [HOSTED]
Posts: 295
Joined: 18-July 07
From: Slough (UK)
Member No.: 46,682



Sorry,
did not manage to reply to the update on that other post yet.
Thanks for your reply.
Have not tried it yet, seems like I am afraid to.
BTW, the reason why variables have changed is simply because I copied it from the other side of my web site (which is bilingual), there is no real change as such.
But thamks for all your help anyway.
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. Which languages do You speak?(156)
  2. Converting Video Files From One Format To Another(6)
  3. Say "i Love You" In 100 Different Languages(31)
  4. Best Sites To Download Free Scripts(4)
  5. What Programming Languages Should I Choose?(17)
  6. Auto Webpage Resolution Format(7)
  7. Need Help With Using Css(12)
  8. Muslims Not Allowed To Date(10)
  9. My First Date With A Girl!(25)
  10. Wmp (windows Media Photo) - The New Image File Format From Microsoft(33)
  11. Personality Test - With Birth Date(18)
  12. Girls - What Kind Of A Date Do You Want?(17)
  13. Link-building Services In 3 Languages(2)
  14. The Best Game Programming Languages?(29)
  15. Online Date Scams(5)
  1. Dreaming In Different Languages?(13)
  2. Php - Forms, Date And Include(0)
  3. Php Date()?(4)
  4. Cool Site To Learn Languages(6)
  5. Mp3(1)
  6. Problem With Time/date On My Computer(7)
  7. Free Web Hosting : Amirborna [screened] [approved](3)
  8. Date Time Lights Temp And Timer, It's Go It All(0)
  9. How To Implement A Date Picker On A Web Page(0)
  10. Help! Mk1 Conversion To Kar Format(2)
  11. Multilingual Search Engine Optimization(3)
  12. Circuit City Closing Stores And Leaving For Good(11)
  13. Gta Iv: Pc Version Hands-on(1)


 



- Lo-Fi Version Time is now: 22nd November 2008 - 03:27 PM