lucid-slugify icon indicating copy to clipboard operation
lucid-slugify copied to clipboard

Transliteration support

Open McSneaky opened this issue 1 year ago • 0 comments

Why this feature is required (specific use-cases will be appreciated)?

Makes slugs working with non-english words / letters

For example currently it turns "Анна" to "" (emptry string), while it should be "anna" "Анна (Musti) Černáč" is turned to "musti-ern" while it should be anna-musti-cernac

It's limitation of @poppins/utils, and it's string.slugify() which uses slugify package under the hood. Slugify packge just deletes all non-english letters https://www.npmjs.com/package/slugify

Alternative would be to use https://www.npmjs.com/package/transliteration slugify method:

slugify('你好,世界');
// ni-hao-shi-jie

slugify('Анна (Musti) Černáč');
// anna-musti-cernac

Have you tried any other work arounds?

Yesh, making manual slug generator that uses https://www.npmjs.com/package/transliteration

Are you willing to work on it with little guidance?

Yesh

McSneaky avatar May 23 '24 20:05 McSneaky