In Ruby on Rails you can easily convert "any" text into a format which would work for subdomains/pathnames.
1) "I am nobody." -> "i-am-nobody"
2) "Grünkohl is a german word." -> "grunkohl-is-a-german-word"
I'd like to do this on the client-side for high responsiveness (alternative would be via Ajax).
The last example is called transliteration (converting Umlauts and other non-latin alphabets letters into latin ones). Transliteration would be a nice2have feature (in such cases I could fallback to Ajax to let Iconv do it).
Anybody knows how to do this with JavaScript? My current code works fine but has issues with multiple blank spaces, and Tête-à-tête
becomes Tte--tte
which is just ugly.