13dagger / slugify
String to slug converter with both cyrillic and european languages support. Requires iconv, uses intl if possible.
v1.0.0
2018-11-13 08:46 UTC
Requires
- php: >=5.4
- ext-iconv: *
Suggests
- ext-intl: Support languages absent in iconv (ex. cyrillic)
This package is auto-updated.
Last update: 2024-10-14 04:07:10 UTC
README
String to slug converter with both cyrillic and european languages support. Requires iconv, uses intl if possible.
Installation
composer require 13dagger/slugify
Usage
require_once __DIR__ . '/vendor/autoload.php'; use slugify\Slugify; $try = 'A æ Übérmensch på høyeste nivå! И я люблю PHP! fi'; $result = Slugify::process($try); echo "$try\n$result\n";
output:
A æ Übérmensch på høyeste nivå! И я люблю PHP! fi
a-ae-ubermensch-pa-hoyeste-niva-i-a-lublu-php-fi