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
Context for your AI agents Icon
Context for your AI agents

Crawl websites, sync to vector databases, and power RAG applications. Pre-built integrations for LLM pipelines and AI assistants.

Build data pipelines that feed your AI models and agents without managing infrastructure. Crawl any website, transform content, and push directly to your preferred vector store. Use 10,000+ tools for RAG applications, AI assistants, and real-time knowledge bases. Monitor site changes, trigger workflows on new data, and keep your AIs fed with fresh, structured information. Cloud-native, API-first, and free to start until you need to scale.
Try for 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