Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#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
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
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
Offline
Pages: 1