dodo / node-slug

slugifies even utf-8 chars!
MIT License
1.07k stars 94 forks source link

Slugs for Russian words? #8

Closed kimptoc closed 10 years ago

kimptoc commented 11 years ago

Hi,

If I try this:

slug("Ревущий фьорд")
'Revushij-ford'

I was hoping for 'ревущии-фьорд' (ie what the WoW api has :) ) - does slug do a letter by letter translation or something?

Thanks, Chris

dodo commented 11 years ago

hm, dunno how to solve this, maybe somebody else does. this issue is related to javascripts regexp /\w/ being "only" equivalent to [A-Za-z0-9_]. because of this, characters like и are simply not allowed an therefor filtered out.

at least i added the option to alter the default replace char map.

KyivJunta commented 11 years ago

Actually module needs some transliteration extensibility. I've had code for Russian/Ukranian langs, so hope in few days pull some code there.

pid commented 10 years ago

@alex4k looks like you are searching for this solution https://github.com/pid/speakingurl it's about transliteration...

kimptoc commented 10 years ago

Thanks for the link