pid / speakingurl

Generate a slug – transliteration with a lot of options
http://pid.github.io/speakingurl/
BSD 3-Clause "New" or "Revised" License
1.12k stars 84 forks source link

Support multiple transliterations at once #102

Open simison opened 7 years ago

simison commented 7 years ago

Perhaps options.lang could accept an array or even just * to run all the language transliterations in alphabetic order?

I just stumbled upon this library: https://github.com/andyhu/transliteration — and I quite like how it always just works, not depending if people fill in English, Finnish or Chinese.

pid commented 7 years ago

@simison The array solution is interesting. Alphabetical order is problematical if we add new languages, IMHO.

simison commented 7 years ago

Valid point, I guess "all" option would need to be predictable set of symbols just like here: https://github.com/andyhu/transliteration/blob/master/data/charmap.json

simison commented 7 years ago

So for the background: I'm building multilingual project and I would like the library to just make best guesses with special symbols — it's just slugs after all so it doesn't need to get it "correct" all the time.