translate name of the month in last update date

Rate this topic: Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.
GK User
Sun May 03, 2015 4:38 pm
Reply with quote
Report this post
Hi,

It took some effort but I now have succeeded in resetting to my liking the date and time format of the template-thingy that shows the last update date to "j F Y, H:m."
There is one problem only that I cannot solve: the date presents the name of the month in English, and I want it in Dutch.
The website language is Dutch, I tried overriding the name of months, but cannot find a way to get to it.
Can you help me to solve this?

Thank you.
Greetings,
Paul
User avatar
Expert Boarder

teitbite
Mon May 04, 2015 3:04 pm
Reply with quote
Report this post
Hi

This is really hard question. This date function is using server settings to determine the language used (if this is the place I'm thinking it is, would be great if You will be able to show me).

Try add this at the beginning of /layout/default.php

Code: Select all
setlocale (LC_ALL, "nl_NL");
User avatar
Moderator

GK User
Mon May 04, 2015 3:21 pm
Reply with quote
Report this post
Hi,

Thanks for the suggestion.
I tried it, but it does not change the format of the date.
This month is in Dutch named as "mei" and the site presents the English "May":
http://www.kleintjemuurkrant.praktijktoetsen.nl/

I pasted the code you advised in the head of the file. Is this what you meant with "at the beginning"?
[attachment=0]php-file.png[/attachment]

Greetings,
Paul
User avatar
Expert Boarder

teitbite
Sat May 09, 2015 1:20 pm
Reply with quote
Report this post
Hi

In such case I believe server settings does not allow to change this.

Try one more thing. Replace the date() function with strftime() like suggested here: http://stackoverflow.com/questions/1328 ... o%C3%BB-09 supportingly this function is better in language support.
User avatar
Moderator


cron