Page 1 of 1
Problem with German "March" in multilingual blog
Posted: Mon Mar 19, 2007 1:44 pm
by lillebror
Hey everybody!
As some others here, I have the problem with showing the calendar month March (in German März) in the right format. Instead, I get "März". I have a two-language-blog, in German and Swedish, and because Swedish weekdays wasn't shown correctly either, I changed the following in /include/functions.inc.php:
Code: Select all
function serendipity_strftime($format, $timestamp = null, $useOffset = true) {
global $serendipity;
static $is_win_utf = null;
into
Code: Select all
function serendipity_strftime($format, $timestamp = null, $useOffset = true) {
global $serendipity;
static $is_win_utf = true;
This, I've read in another forum thread here, and it worked, but only for Swedish dates. I still don't get the German umlauts to work. Does anybody have a solution?
Lillebror
Re: Problem with German "March" in multilingual bl
Posted: Mon Mar 19, 2007 1:51 pm
by garvinhicking
Hi!
The proper solution would be to install de_DE locales on your server.
Serendipity uses the locale system of the server to print localized dates. Search this forum for "locale" for more information.
Regards,
Garvin
Posted: Sat Mar 24, 2007 7:11 pm
by lillebror
The problem is, if I let the option above, the Swedish Dates (with å letters) seem to be correct. If I set the option strftime back to "null", the German "März" is correct, but no longer the Swedish ones. I don't understand that really.
I do not own my own server, so I must ask my hoster. You said, they have to install the de_DE locale, or what? How must the option strftime then to be set, as null or true?
Lillebror
Posted: Sun Mar 25, 2007 2:00 pm
by garvinhicking
Hi!
Yes, that's the reason why you should not patch the s9y code, but instead install the de_DE locales (de_DE.UTF8, de_DE.ISO8859-1).
I do not own my own server, so I must ask my hoster. You said, they have to install the de_DE locale, or what? How must the option strftime then to be set, as null or true?
Just reset the changes you made to the file to the original file.
Best regards,
Garvin
Posted: Tue Jul 22, 2008 10:32 am
by gimmel
Some hosters are not able to install the proper UTF locales (like my hoster
Manitu).
So I changed every Smarty variable in every .tpl to convert the ä-Umlaut. (Since there are no other umlauts in german month names.)
Example:
Change
{$head_subtitle}
to
{$head_subtitle|regex_replace:"/\xE4/":"ä"}
That's no fun, I know. The other solution is to switch to another hoster which is able to install locales. (Or to have your blog running with ISO8859. But who really wants that…?)
Posted: Tue Jul 22, 2008 10:37 am
by garvinhicking
Hi!
Really, why is Manitu not able to do that? That's strange, I figured them to be a really good hosting company...?!
Regards,
Garvin
Posted: Tue Jul 22, 2008 12:08 pm
by gimmel
Mostly they are really good. But the locales thing was no fun. I had to explain them what locales are and how to show the installed locales (locale -a). They only have de_DE installed.
After asking them to install the missing locales de_DE.ISO8859-1, de_DE.ISO8859-15 and de_DE.UTF-8, Manuel answered:
„Wir schauen, was wir tun können (es ist aber nicht immer so einfach, wie es auf einem Home-Server wäre - wir reden hier über ca. 250 Fragen und Aspekte aus einem Sicherheitskatalog, die es zu beachten gibt).“
This happened in March (as you could guess) an there is no UTF locale 'til today as you can see
here.
I'm working with many hosters and all of them have UTF-8 locales except for manitu. I don't understand that either. Disappointing…