skapator/greeklish

This package is abandoned and no longer maintained. No replacement package was suggested.

Converts Greek characters to latin. Used for slugs mainly

dev-master 2014-09-30 08:33 UTC

This package is not auto-updated.

Last update: 2022-02-14 01:43:19 UTC


README

Convert Greek characters to latin and make greeklish slugs.

Quick Installation

To install through composer, simply put the following in your composer.json file:

{
	"require": {
		"skapator/greeklish": "dev-master"
	}
}

Run composer update to pull down the latest version.

Now open up app/config/app.php and add the service provider to your providers array.

    'providers' => array(
        ...
        'Skapator\Greeklish\GreeklishServiceProvider',
    )

Now add the alias.

    'aliases' => array(
        ...
        'Greeklish' => 'Skapator\Greeklish\Facades\Greeklish',
    )

Usage

-- Make Slug.

    $text = 'Γεια σου Κόσμε';
    Greeklish::slug($text)

    Will make:
    `geia-sou-kosme`

-- Make a greeklish text.

    $text = 'Γεια σου Κόσμε';
    Greeklish::text($text)

    Will make:
    `Geia sou kosme`

-- Extra arguments.

    Greeklish::text($text, true)
    // will remove one letter words

    Greeklish::slug($text, false, true)
    //will remove two letter words

--