/slugify

String to slug converter with both cyrillic and european languages support. Requires iconv, uses intl if possible.

Primary LanguagePHPGNU General Public License v3.0GPL-3.0

Slugify

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