Download the PHP package voku/urlify without Composer
On this page you can find all versions of the php package voku/urlify. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Package urlify
Short Description PHP port of URLify.js from the Django project. Transliterates non-ascii characters for use in URLs.
License BSD-3-Clause
Homepage https://github.com/voku/urlify
Informations about the package urlify
🔗 URLify
Description
Convert any string into an valid and readable string for usage in the url.
This is a PHP port of "URLify.js" from the Django project + fallback via "Portable ASCII". We handles symbols from many languages via an matching-array and others via "ASCII::to_transliterate()".
- https://github.com/django/django/blob/master/django/contrib/admin/static/admin/js/urlify.js
- https://github.com/voku/portable-ascii
- https://github.com/voku/portable-utf8
Install via "composer require"
Usage:
namespace: "voku\helper\URLify"
To generate slugs for URLs:
To generate slugs for file names:
To simply transliterate characters:
To extend the character list:
To extend or replace the default replacing list:
To extend the list of words to remove for one language:
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.
Available languages
- Arabic: 'ar'
- Austrian (German): 'de_at'
- Austrian (French): 'fr_at'
- Azerbaijani: 'az'
- Bulgarian: 'bg'
- Burmese: 'by'
- Croatian: 'hr'
- Czech: 'cs'
- Danish: 'da'
- English: 'en'
- Esperanto: 'eo'
- Estonian: 'et'
- Finnish: 'fi'
- French: 'fr'
- Georgian: 'ka'
- German: 'de'
- Greek: 'el'
- Hindi: 'hi'
- Hungarian: 'hu'
- Kazakh: 'kk'
- Latvian: 'lv'
- Lithuanian: 'lt'
- Norwegian: 'no'
- Polish: 'pl'
- Romanian: 'ro'
- Russian: 'ru'
- Serbian: 'sr'
- Slovak: 'sk'
- Swedish: 'sv'
- Switzerland (German): 'de_ch'
- Switzerland (French): 'fr_ch'
- Turkish: 'tr'
- Ukrainian: 'uk'
- Vietnamese: 'vn'
Support
For support and donations please visit Github | Issues | PayPal | Patreon.
For status updates and release announcements please visit Releases | Twitter | Patreon.
For professional support please contact me.
Thanks
- Thanks to GitHub (Microsoft) for hosting the code and a good infrastructure including Issues-Managment, etc.
- Thanks to IntelliJ as they make the best IDEs for PHP and they gave me an open source license for PhpStorm!
- Thanks to Travis CI for being the most awesome, easiest continous integration tool out there!
- Thanks to StyleCI for the simple but powerfull code style check.
- Thanks to PHPStan && Psalm for relly great Static analysis tools and for discover bugs in the code!
All versions of urlify with dependencies
voku/portable-utf8 Version ~6.0
voku/stop-words Version ~2.0
voku/portable-ascii Version ~2.0