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
Premier Construction Software Icon
Premier Construction Software

Premier is a global leader in financial construction ERP software.

Rated #1 Construction Accounting Software by Forbes Advisor in 2022 & 2023. Our modern SAAS solution is designed to meet the needs of General Contractors, Developers/Owners, Homebuilders & Specialty Contractors.
Learn More
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