UTF and Danish calendartext

Having trouble installing serendipity?
Post Reply
Henning

UTF and Danish calendartext

Post by Henning »

I have made a succesful installation of s9y and I must say - It's brilliant! javascript:emoticon(':D')
Very Happy
But one thing is not working on my Danish version of this. The calendar text with the danish characters in "Lør" and "Søn" for the weekdays saturday and sunday.
It is earlier mentioned in this forum, that the locale file is not working (http://www.s9y.org/forums/viewtopic.php?t=2950&start=0) and the same is the situation at my hotel.
I really want to proceed with UTF-8 and not go back to "native", (which solves this problem) so now I'm: What to do? Is there a fix on the way in s9y? Can I someway drop the locale file and my self define the weekdayarray?

Thanks
Henning :D
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: UTF and Danish calendartext

Post by garvinhicking »

You must use the UTF-8 version of your host's locale. And you sadly must enter "da_DK.UTF-8" or the real name of your locale inside the lang/UTF-8/serendipity_lang_da.inc.php file. If you have figured out the right locale name, you can tell it to us and then we can include it in the default file! :)

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Henning

Sorry

Post by Henning »

The filename of the locale-file is correct and I have already placed the filename in the the languagefile, which - sadly - does not produce the right characters.
I asked the servaradmin about this, and they said, that the danish locale-file was existing, but did not work properly neither in asp nor in php.
A known problem, which they excuse but find no solution to.
The rest of the blog is working fine in utf8, so I thought that there might be a way to change the use of the locale file to another weekdayarray?

till later...
Henning
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Sorry

Post by garvinhicking »

But in the current file it reads "ISO8859-1", which is the wrong locale for a UTF-8 blog...?!

Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Henning

Yes?

Post by Henning »

ehhh.....?
Actually I edited the da-language-file in /serendipity/lang/UTF-8 and replaced the "ISO8859-1" with the correct utf-8-line as you have pointed out in the description in this post: http://www.s9y.org/forums/viewtopic.php?t=2950

.....?[/quote][/u]
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Yes?

Post by garvinhicking »

Oooh, okay. I'm sorry. I misunderstood.

Well, then I honestly don't know that much further. Using locales is much easier for a developer than creating and translating a large array of day, month and yearnames including all their abbreviations and in multiple charsets...

Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Henning

Agree

Post by Henning »

I agree in that!!!
Hopefully b-one.net will be able to give a better language-support in near future!

Thanks for helping - Henning
hessel
Posts: 3
Joined: Sat Jun 17, 2006 4:58 pm

Post by hessel »

I'm sorry for picking up this old thread, but I have the exact same problem in Norwegian.

Language file is using UTF8, but the calendar shows wrong characters for the norwegian special character ø. The norwegian saturday and sunday, lørdag and søndag, shows l?rdag and s?ndag.

I have no problems with norwegian characters (æ, ø and å) any other place in my blog, only in the calendar.

Can you please give me some instructions to reduse the length of days from 3 letters to 1 letter? Take a look at my blog on www.hessel.no

It shows "Man", "Tir" and so on for the days, and I would like it to show JUST "M", "T" and so on because of the bug.

The format in plugin_calendar.tpl is currently %a for the day.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

Serendipity uses a "locale" system on your server for showing date-related texts.

If you get these errors it means that the used norewgian locales are not available on your server. Please contact your server admin and ask him to install either on of those:

no_NO.UTF-8, no_NO.UTF8

Both are not installed, which is why it falls back to the "norwegian" locale which uses ISO-8859.

HTH,
GArvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
hessel
Posts: 3
Joined: Sat Jun 17, 2006 4:58 pm

Post by hessel »

Okay. But how can I reduse the length of days from 3 letters to 1 letter in the calendar? Can I use another format than %a in plugin_calendar.tpl?
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

You can use

Code: Select all

{$dow.date|@formatTime:"%A":false|truncate:0:2:true}
(or something like that -- you might want to check http://smarty.php.net/truncate :)

Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
hessel
Posts: 3
Joined: Sat Jun 17, 2006 4:58 pm

Post by hessel »

Thanks! This works:

Code: Select all

{$dow.date|@formatTime:"%A":false|truncate:1:"":true}
:D
Post Reply