Jump to content
xisto Community
mrdee

Multilingual Possibilities In Php Date format in different languages

Recommended Posts

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.

Share this post


Link to post
Share on other sites

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:

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

then use it later in your output.

Edited by sonesay (see edit history)

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.