Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-03-27 08:45:00

joel
Member
Registered: 2004-11-26
Posts: 162

Displaying swedish date-format

Hi!

I recently moved my site to another server (within the same hosting company). Everything seems to work fine except the swedish date-formats. Even though I set the languge to swedish I am only allowed to choose from the english date-formats. It looks to me like the new server has a different configuration than the previous one.

My host is quite confused about this. He wants to know if there are certain modules etc. that should be installed for txp to work proberly.
The server is linux/apache.

Do you guys have any ideas?

Thanks in advance

Offline

#2 2006-03-27 12:02:22

skoggy
Member
From: Westcoast of Sweden
Registered: 2005-03-27
Posts: 209
Website

Re: Displaying swedish date-format

Kanske en titt i den svenska delen av forumet kan hjälpa till?

(link to the swedish part of this forum)

Last edited by skoggy (2006-03-27 12:03:02)

Offline

#3 2006-03-27 17:12:39

joel
Member
Registered: 2004-11-26
Posts: 162

Re: Displaying swedish date-format

Yes, I’ve been searching there as well… with no luck so far…

Any ideas?

Offline

#4 2006-03-27 17:24:46

Dragan
Member
From: Novi Sad, Serbia
Registered: 2005-10-26
Posts: 100
Website

Re: Displaying swedish date-format

I could join joel on this. TXP hasn’t been translated to my language yet (Serbian) and I would like localised dates too. For instance, I am using the monthly archive technique, and I get like “march 2006” which is kind of an eyesore in an all serbian site.

I keep remidning myself to translate TXP completely to serbian, but I just can’t get myself to do it because I always seem to lack time. Right now I am using a partially translated english lang file, basically everything that goes an ordinary visitor would ever get to see is translated, but I prefer to keep the interface in english for some reason still. :)

Offline

#5 2006-03-27 17:34:12

joel
Member
Registered: 2004-11-26
Posts: 162

Re: Displaying swedish date-format

But the thing is that the dates aren’t in relation with the language-file. I think this has something to do with the webserver. Whats bugging me most is that it used to work on my previous server.

Offline

#6 2006-03-27 17:44:01

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: Displaying swedish date-format

Would this post help?

Offline

#7 2006-03-27 17:47:33

Dragan
Member
From: Novi Sad, Serbia
Registered: 2005-10-26
Posts: 100
Website

Re: Displaying swedish date-format

yeah, I guess that’s it, but where am I supposed to put that php code? Just include it at the beginning of my page template?

Offline

#8 2006-03-27 17:49:45

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: Displaying swedish date-format

I think it’s meant to be used instead of <txp:posted />, or wherever you need a date output…

Offline

#9 2006-03-27 22:43:23

zem
Developer Emeritus
From: Melbourne, Australia
Registered: 2004-04-08
Posts: 2,579

Re: Displaying swedish date-format

Joel: if Swedish is working in the admin interface but not dates, it means your server doesn’t support the Swedish locale. You could ask your hosting company about it; the locale identifiers we’re looking for are ‘sv_SE.UTF-8’, ‘sv_SE’, ‘sv’, ‘swe’, ‘sve’, ‘swedish’, ‘sv_SE.ISO_8859-1’.

More in the FAQ. If you find a locale identifier that works, post it here please.

Dragan: even a partial translation is better than nothing. Post what you have on the i18n forum, maybe someone will help.


Alex

Offline

#10 2006-03-27 22:54:19

Dragan
Member
From: Novi Sad, Serbia
Registered: 2005-10-26
Posts: 100
Website

Re: Displaying swedish date-format

OK zem, will do.

Offline

#11 2006-03-28 09:49:47

joel
Member
Registered: 2004-11-26
Posts: 162

Re: Displaying swedish date-format

Thanks Zem!

I’ve posted this info to my host. Hope it will work out finally.

Offline

#12 2006-03-28 13:31:11

Dragan
Member
From: Novi Sad, Serbia
Registered: 2005-10-26
Posts: 100
Website

Re: Displaying swedish date-format

I tried this code:
<code><txp:php>
global $locale;
setlocale(LC_ALL, ‘sr_YU.UTF-8’);
echo posted(array(‘format’ => ‘%B %Y’));
setlocale(LC_ALL, $locale);
</txp:php></code>
and it still outputs “March 2006” instead of “Mart 2006”. The locale sr_YU.UTF-8 is supposed to be correct.

I have asked my server admin about this but he is away currently, so maybe you guys could tell what is the problem here?

Offline

Board footer

Powered by FluxBB