Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2018-03-30 03:06:10

Summer
Member
Registered: 2018-01-29
Posts: 60

Translation of date format

hi guys, where is the translation of the date format in the website settings?

Offline

#2 2018-03-30 08:47:14

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,615
Website

Re: Translation of date format

A number of things to try:

1. First things first, have you changed your Language preferences to your desired language in “Admin › Languages”?

2. Date and time settings are often server dependent. If your server already has different language locales installed, this should force it to display in a particular language:

<txp:php>
  global $locale;
  setlocale(LC_ALL, 'it_IT');
</txp:php>

Place this in your page template and insert your own language code in place of it_IT (Italian).

3. If none of that helps, etc_date might be your answer. etc describes the background to the language problem in his post.


TXP Builders – finely-crafted code, design and txp

Offline

#3 2018-03-30 14:51:24

Summer
Member
Registered: 2018-01-29
Posts: 60

Re: Translation of date format

jakob wrote #310460:

I mean, I need to adjust the translation and format of the date.

Offline

#4 2018-03-30 15:03:23

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

Re: Translation of date format

Txp date tags formats are these of strftime() function, e.g. <txp:posted format="%m-%d, %Y" />. But, as jakob said, the strings come from the current server locale and you can not alter them. IIRC, etc_date can do it.

Offline

#5 2018-03-30 15:19:06

Summer
Member
Registered: 2018-01-29
Posts: 60

Re: Translation of date format

etc wrote #310473:
jakob wrote #310460:

Understand, thanks

Offline

Board footer

Powered by FluxBB