2017 © Pedro Peláez
 

library greek-slug-generator

A slug (pretty URL) generator, which supports Greek UTF-8 encoded characters

image

stathisg/greek-slug-generator

A slug (pretty URL) generator, which supports Greek UTF-8 encoded characters

  • Monday, May 29, 2017
  • by StathisG
  • Repository
  • 1 Watchers
  • 7 Stars
  • 28 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 5 Versions
  • 12 % Grown

The README.md

(Greek) Slug Generator

GreekSlugGenerator is a slug (pretty URL) generator, which supports Greek UTF-8 encoded characters, and generates a slug based on strings which are typically titles of pages or articles., (*1)

The class can be used for English-only titles as well., (*2)

If a Greek character is found, it is converted to its English equivalent., (*3)

Spaces as well as some punctuation marks are converted to dashes, but if at any point multiple sequential dashes are produced, only one appears in the final slug., (*4)

Installation

It can be installed either by requiring the GreekSlugGenerator.php file under src, or via Composer by using the [Packagist archive][2]., (*5)

Examples

use \StathisG\GreekSlugGenerator\GreekSlugGenerator;

// produces: the-class-can-be-used-for-english-only-titles-as-well
echo GreekSlugGenerator::getSlug('The class can be used for ENGLISH-ONLY titles as well');

// produces: it-ignores-multiple-spaces-between-the-words
echo GreekSlugGenerator::getSlug('It   ignores   multiple   spaces   between   the   words');

// produces: as-well-as-brackets-quotes-commas-and-full-stops
echo GreekSlugGenerator::getSlug('As well as brackets {[()]}, quotes `\'", commas, and full stops.');

//produces: some-others-are-converted-in-dashes-but-if-at-any-point-multiple-sequential-dashes-are-produced-only-one-appears-
echo GreekSlugGenerator::getSlug('Some others are converted in dashes, but if at any point multiple sequential dashes are produced, only one appears: \/_-');

// produces: greek-example-1-ekthesh-fwtografias-to-rethymno-kai-h-thalassa-hmeres-rethymnoy-2013
echo GreekSlugGenerator::getSlug('Greek example #1: Έκθεση Φωτογραφίας «Το Ρέθυμνο και η Θάλασσα» - "Ημέρες Ρεθύμνου" 2013');

// produces: greek-example-2-h-ekthesh-ksekinaei-thn-tetarth-08-05-2013-kai-wra-20-45-h-diarkeia-ths-ektheshs-tha-einai-apo-08-05-ews-07-06
echo GreekSlugGenerator::getSlug('Greek example #2: Η έκθεση ξεκινάει την Τετάρτη 08/05/2013 και ώρα 20:45. Η διάρκεια της έκθεσης θα είναι από 08/05 έως 07/06');

The Versions

29/05 2017

dev-master

9999999-dev https://github.com/stathisg/greek-slug-generator

A slug (pretty URL) generator, which supports Greek UTF-8 encoded characters

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

slug greek greeklish

29/05 2017

2.0.2

2.0.2.0 https://github.com/stathisg/greek-slug-generator

A slug (pretty URL) generator, which supports Greek UTF-8 encoded characters

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

slug greek greeklish

26/05 2017

2.0.1

2.0.1.0 https://github.com/stathisg/greek-slug-generator

A slug (pretty URL) generator, which supports Greek UTF-8 encoded characters

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

slug greek greeklish

27/03 2016

2.0.0

2.0.0.0 https://github.com/stathisg/greek-slug-generator

A slug (pretty URL) generator, which supports Greek UTF-8 encoded characters

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

slug greek greeklish

27/03 2016

1.0.0

1.0.0.0 https://github.com/stathisg/greek-slug-generator

A slug (pretty URL) generator, which supports Greek UTF-8 encoded characters

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

slug greek greeklish