ailon's DevBlog: Development related stuff in my life

Slug Transliterator Extension for BlogEngine.NET

4/28/2008 3:17:51 PM

While I'm at it, I decided to write another extension for BlogEngine.NET. Those writing in English or in other Latin alphabet language only aren't probably familiar with this issue but everyone else is (I think).

When you create a post in Russian (for example) with title like "Привет, мир!" ("Hello, World!") you get automatic slug and (as a result your post link) looking like this:

/blog/post/2008/04/d09fd180d0b8d0b2d0b5d1822c-d0bcd0b8d180!.aspx

This doesn't look much better then the GUID version if you ask me. So, this is where SlugTransliterator comes to rescue. After this post passes through this extension this URL will look like this:

/blog/post/2008/04/Privet--mir!.aspx

A little better, don't you think? I don't know if it has any positive effect on SEO related aspects but it's definitely much more readable and rememberable (is this a word?).

By default SlugTransliterator is configured to transliterate from Russian (Cyrillic) and Lithuanian (Baltic) titles. But it can be configured to do any sort of char-to-char translation using Extension Manager.

Download

SlugTransliterator for BlogEngine.NET v.1.0 (2.5kb)

Installation

Just copy SlugTransliterator.cs to your App_Code/Extensions directory and configure in the admin section as you see fit.

Hope this helps someone. If not, I did it for myself anyway :P

kick it on DotNetKicks.com

P.S.: you may also want to use this extension to transliterate * symbol which results in bad URL in current (1.3) version of BE. Default configuration translates "*" to "-"

Tags: , ,

blog comments powered by Disqus
Copyright © 2003 - 2014 Alan Mendelevich
Powered by BlogEngine.NET 2.5.0.6