PapaScott I like big blogs and I cannot lie! 🐘

WordPress and German Slugs

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.

comments powered by Disqus