This library provides methods to generate slugs for URLs, filenames or any other target that has a limited character set. It’s based on PHPs Transliterator class which uses the data of the CLDR to transform characters between different scripts (e.g. Cyrillic to Latin) or types (e.g. upper- to lower-case or from special characters to ASCII). There are many code snippets and some good libraries out there that create slugs, but I didn’t find anything that met my requirements. Options are often very limited which makes it hard to customize for different use cases. Some libs carry large rulesets with them that try to convert characters to ASCII, no one uses Unicode’s CLDR which is the standard for transliteration rules and many other transforms.

Features

  • To install the library use Composer or download the source files from GitHub
  • Documentation available
  • Examples available
  • Internally the slug generator uses Transform Rules to convert invalid characters to valid ones
  • Generate slugs for URLs, filenames or any other target
  • It’s based on PHPs Transliterator class

Project Samples

Project Activity

See All Activity >

Categories

Libraries

License

MIT License

Follow Slug Generator Library

Slug Generator Library Web Site

Other Useful Business Software
MongoDB Atlas runs apps anywhere Icon
MongoDB Atlas runs apps anywhere

Deploy in 115+ regions with the modern database for every enterprise.

MongoDB Atlas gives you the freedom to build and run modern applications anywhere—across AWS, Azure, and Google Cloud. With global availability in over 115 regions, Atlas lets you deploy close to your users, meet compliance needs, and scale with confidence across any geography.
Start Free
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of Slug Generator Library!

Additional Project Details

Programming Language

PHP

Related Categories

PHP Libraries

Registered

2024-05-30