WordPress and German Slugs

by PapaScott on 02 June 2004

I wanted to use sanitized titles as legible permalinks when I converted to WordPress, so I was somewhat dismayed on my first trial run when all the umlauts (ä,ö,ü) were thrown out. That is, a post entitled “Schröder Sucks” was encoded as schrder-sucks, which isn’t legible at all. I went browsing through the WordPress CVS repository, and found that code for converting (rather than dropping) high-ASCII characters had been added after 1.2 was released. I copied the code into a plugin, and ended up with schroder-sucks, which is almost correct.

In German, the convention is to transliterate umlauts into two letters (ä=ae, ö=oe, ü=ue). The CVS code has some two-character conversions, so I added the umlauts to that list in my plugin, and the result was schroeder-sucks, which is just what I wanted. I’ve saved the German Permalinks plugin at the WordPress Wiki. Note that to import correctly, the plugin needs to be installed and activated before the import.

Horst June 4, 2004 at 11:06

I recently set up Movable Type (2.6) to do titles as file names and was pleasantly surprised to see that it handles umlauts correctly.

michel v June 8, 2004 at 00:06

Objectively, there is no correct way to handle umlauts without any information on the language used.
In my mother tongue, if titles like “Joyeux Nöel” (Merry Christmas) were converted to “Joyeux Noeel”, users would think this is a bug. Given that MT’s primarily developed by English-speaking folks whose only contact with umlauts is borrowed German vocabulary, it makes sense that they felt umlauts should be handled the German way.

A solution to this problem would be to let the user define their blog’s language, and then have some conditionnal replacements for the right language.
(That could be extended to enable BiDi for when language is Hebrew or Arabic, and then some other language-specific stuff that we haven’t thought of…)

PapaScott June 8, 2004 at 08:06

OK, I can buy that explanation. As long as I can pick a default language without having to use that language for the whole GUI, I’ll be happy.

And if I ever name a post “Joyeux Nöel”, I’ll make sure I change the slug by hand.

PapaScott June 8, 2004 at 16:06

I’ve shortened the plugin at the wiki to be a simple plugin rather than a proposed change to CVS.

Fred August 13, 2006 at 03:59

Noel in French has the two dots over the e, not the o. I don’t know of any other language that has “our” umlauts.

So, converting the umlauts correctly should in fact be the default behavior.

Learn German Words November 25, 2006 at 20:13

Very nice blog you have here :0)

Learn German December 6, 2006 at 12:45

That’s pretty funny, I wouldn’t have ever thought umlauts would cause a problem like that.

At least it’s fixed now.

Comments on this entry are closed.

{ 3 trackbacks }

Previous post:

Next post: