Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2013-07-08 16:35:46

giampablo
Member
From: Italy
Registered: 2008-07-17
Posts: 86
Website

wrong dates translation after moving to new host

After moving to a new host a textpattern site and updating it to 4.5.4, I have a problem with dates format.
Now all dates are in english (i.e. 8 july 2013), whereas in the former hosting they were showing correctly in Italian (8 luglio 2013).

Diagnostics report: parse_ini_file and show_source php functions are disabled.
After asking my provider, I obtained enabling the parse_ini_file function (used by txp), show_source is still disabled.
This did not solve the problem. All dates are still in english (with italian language installed and activated).

In preferences popup, you can’t choose a date format and archive date format other than english, whilst in the past I had also italian.

Any idea?
Php problem? Database?

PHP: 5.3.2-1ubuntu4.19
MySQL: 5.1.69-0ubuntu0.10.04.1
Locale: en_US.UTF-8
Server: Apache/2.2.14 (Ubuntu)

Thanks in advance

Offline

#2 2013-07-08 18:09:10

etc
Developer
Registered: 2010-11-11
Posts: 5,188
Website GitHub

Re: wrong dates translation after moving to new host

Ask your provider, whether Italian locale is installed on the new server, or try <txp:php>echo setlocale(LC_ALL, 'it_IT');</txp:php> in some article.

Offline

#3 2013-07-08 18:11:31

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: wrong dates translation after moving to new host

Textpattern relies to PHP locale support to generate localized dates. PHP in return relies to the host system’s localization support. Your installation defaulting to English would indicate that your system doesn’t have Italian localization installed, and you would have to install it to get localized dates. Your hosting provider should be able to help with that.

Offline

#4 2013-07-08 18:25:20

giampablo
Member
From: Italy
Registered: 2008-07-17
Posts: 86
Website

Re: wrong dates translation after moving to new host

Thanks a lot, etc and Gocom, I will ask my provider.

Your support is great!
I will let you know when the problem is solved.

Offline

#5 2013-07-08 18:31:23

etc
Developer
Registered: 2010-11-11
Posts: 5,188
Website GitHub

Re: wrong dates translation after moving to new host

If in hurry, etc_date can help (you will need to define Italian day/month names yourself). <txp:etc_date date="posted" lang="it_IT" /> will output your custom dates, and switch to the system Italian locale as soon as it is installed.

Offline

#6 2013-07-08 19:00:10

giampablo
Member
From: Italy
Registered: 2008-07-17
Posts: 86
Website

Re: wrong dates translation after moving to new host

Thanks Oleg, I will give a look.
In any case I guess the customer can wait for a couple of days.

Offline

Board footer

Powered by FluxBB