Download the PHP package jbroadway/urlify without Composer
On this page you can find all versions of the php package jbroadway/urlify. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download jbroadway/urlify
More information about jbroadway/urlify
Files in jbroadway/urlify
Package urlify
Short Description A fast PHP slug generator and transliteration library that converts non-ascii characters for use in URLs.
License BSD-3-Clause-Clear
Homepage https://github.com/jbroadway/urlify
Informations about the package urlify
URLify for PHP
A fast PHP slug generator and transliteration library, started as a PHP port of URLify.js from the Django project.
Handles symbols from latin languages, Arabic, Azerbaijani, Bulgarian, Burmese, Croatian, Czech, Danish, Esperanto,
Estonian, Finnish, French, Switzerland (French), Austrian (French), Georgian, German, Switzerland (German),
Austrian (German), Greek, Hindi, Kazakh, Latvian, Lithuanian, Norwegian, Persian, Polish, Romanian, Russian, Swedish,
Serbian, Slovak, Turkish, Ukrainian and Vietnamese, and many other via ASCII::to_transliterate()
.
Symbols it cannot transliterate it can omit or replace with a specified character.
Installation
Install the latest version with:
Usage
First, include Composer's autoloader:
To generate slugs for URLs:
To generate slugs for file names:
To simply transliterate characters:
To extend the character list:
To extend the list of words to remove:
To prioritize a certain language map:
Please note that the "ü" is transliterated to "ue" in the first case, whereas it results in a simple "u" in the latter.