DARKF3D3 Posted October 20, 2015 Share Posted October 20, 2015 I have a php file that use a date() function to show a date on my store home.This is a part of my file: I have a php file that use a date() function to show a date on my store home. foreach($res_csv as &$row) { $values = str_getcsv($row, ","); if (count($values) >= 3) $rows[] = array( 'time' => date("d F Y", $values[0]), 'id' => $values[1], 'rating' => $values[2], 'review' => $values[3], ); } The capital F should show the complete name of the month, the problem it's that is showed in English but my store it's set only in Italian language. Shouldn't use automatically the language of my store? Link to comment Share on other sites More sharing options...
Rolige Posted October 21, 2015 Share Posted October 21, 2015 The answer is easy, and this is because the php language is written in English (like most of existing programming languages), what should you do?, translate each month. Link to comment Share on other sites More sharing options...
DARKF3D3 Posted October 21, 2015 Author Share Posted October 21, 2015 Thank you COTOKO, but how can I translate them? I should find them into the translation page of Prestashop? Link to comment Share on other sites More sharing options...
tuk66 Posted October 21, 2015 Share Posted October 21, 2015 From http://php.net/manual/en/function.date.php: To format dates in other languages, you should use the setlocale() and strftime() functions instead of date(). Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now