Webpages PHP date always shows english.

They have: 3 posts

Joined: May 2007

OK here it goes I rented a VPS server and on my domain I installed oscommerce..well in os commerce I choose the language Turkish and in turkish.php locale is defined. but on the web pages of oscommrce the language shows Turkish for everything except date names and months they all show in English...

This is my first vps server I don't' know what it is missing but I can not set php locale information because it does not read from the server...if this is the case where should i put the locale folder or is there any other solution to solve this problem..

my server is Ubuntu...bind and plesk installed.

I really appreciate any kind of help..

thanks in advance.

Greg K's picture

He has: 2,145 posts

Joined: Nov 2003

Not sure exactly, but you want to look into the SETLOCAL function in PHP.

-Greg

They have: 3 posts

Joined: May 2007

Thanks for your quick reply.

I have this function...@setlocale(LC_TIME, 'tr-TR');

I am running in ubuntu the problem is that...if i am checkin the right folder there is no tr-TR in locales folder. The only locale available there is en-US. I think that is the main problem.

So I think I need to set up a tr-TR or something like it so it gets the locales. But I need to be sure of the ecatct locales folder location.

Or there might be some other way to set the locales or something else to fix my problem?

He has: 1,380 posts

Joined: Feb 2002

Can't you just sync the server with a timezone? I run desktop Ubuntu, and I know you can not only pick what timezone you want, but also the time server that you sync your clock with.

That being said, I'm pretty sure this is fixable in apache too. I don't know what the timezones are for outside the US, but for New York would be GMT -5:00, LA would be GMT - 8:00, etc.

So, I would suggest trying to find the setting in Apache, if it's not easily fixed within Ubuntu. Apache allows more room for custom commands and code, unless you know where to find the exact file you need inside Ubuntu.

As a side note, you could always adjust the time. If you know that the time is always 5 hours behind (just an example), why not just add 5 hours to the time that you grab from the server? That would be the quickest way to temporarily solve this problem.

They have: 3 posts

Joined: May 2007

okey i found the solution server root locale a does not show tr_TR so I need to install the locale myself after that it is ok.

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.