php-extended/php-slugifier-ascii-transliterator

This package is abandoned and no longer maintained. The author suggests using the php-extended/php-slugifier-object package instead.

A slugifier that does ascii transliterations of unicode text

3.1.16 2021-06-25 15:33 UTC

This package is auto-updated.

Last update: 2021-06-28 06:13:14 UTC


README

A slugifier that does ascii transliterations of unicode text. This library is inspired by martinml's implementation of transliterator and the original python implementation.

This library transliterates the given strings, but is not compatible with the other implementations based on the same tables. This library does only the transliteration and still contains symbols. For a narrower slugification process, this slugifier should be chained with another slugifiers like AsciiCut and Lower.

coverage build status

Installation

The installation of this library is made via composer. Download composer.phar from their website. Then add to your composer.json :

	"require": {
		...
		"php-extended/php-slugifier-ascii-transliterator": "^3",
		...
	}

Then run php composer.phar update to install this library. The autoloading of all classes of this library is made through composer's autoloader.

Basic Usage

You may use this library the following way :


use PhpExtended\Slugifier\AsciiTransliteratorSlugifier;

$slugifier = new AsciiTransliteratorSlugifier();
$slug = $slugifier->slugify('<string data>');

License

Original character transliteration tables:

Copyright 2001, Sean M. Burke sburke@cpan.org, all rights reserved.

Python code and later additions:

Copyright 2019, Tomaz Solc tomaz.solc@tablix.org

More modifications on the tables by Anastaszor:

GPLv2 (See license file).

The rest of the code (/src) is:

MIT (See license file).