2017 © Pedro Peláez
 

library urlify

PHP port of URLify.js from the Django project. Transliterates non-ascii characters for use in URLs.

image

voku/urlify

PHP port of URLify.js from the Django project. Transliterates non-ascii characters for use in URLs.

  • Saturday, December 23, 2017
  • by voku
  • Repository
  • 2 Watchers
  • 10 Stars
  • 89,415 Installations
  • PHP
  • 3 Dependents
  • 0 Suggesters
  • 73 Forks
  • 0 Open issues
  • 53 Versions
  • 6 % Grown

The README.md

Build Status Coverage Status Codacy Badge Latest Stable Version Total Downloads License Donate to this project using Paypal Donate to this project using Patreon, (*1)

🔗 URLify

Description

Convert any string into an valid and readable string for usage in the url., (*2)

This is a PHP port of "URLify.js" from the Django project + fallback via "Portable ASCII". We handles symbols from many languages via an matching-array and others via "ASCII::to_transliterate()"., (*3)

  • https://github.com/django/django/blob/master/django/contrib/admin/static/admin/js/urlify.js
  • https://github.com/voku/portable-ascii
  • https://github.com/voku/portable-utf8

Install via "composer require"

composer require voku/urlify

Usage:

namespace: "voku\helper\URLify", (*4)

To generate slugs for URLs:

echo URLify::filter(' J\'étudie le français ');
// "J-etudie-le-francais"

echo URLify::filter('Lo siento, no hablo español.');
// "Lo-siento-no-hablo-espanol"

To generate slugs for file names:

echo URLify::filter('фото.jpg', 60, '', true);
// "foto.jpg"

To simply transliterate characters:

echo URLify::downcode('J\'étudie le français');
// "J'etudie le francais"

echo URLify::downcode('Lo siento, no hablo español.');
// "Lo siento, no hablo espanol."

/* Or use transliterate() alias: */

echo URLify::transliterate('Lo siento, no hablo español.');
// "Lo siento, no hablo espanol."

To extend the character list:

URLify::add_chars(array(
  '¿' => '?', '®' => '(r)', '¼' => '1/4',
  '½' => '1/2', '¾' => '3/4', '¶' => 'P'
));

echo URLify::downcode('¿ ® ½ ¼ ¾ ¶');
// "? (r) 1/2 1/4 3/4 P"

To extend or replace the default replacing list:

URLify::add_array_to_seperator(array(
  "/®/"
));

echo URLify::filter('¿ ® ½ ¼ ¾ ¶');
// "12-14-34-P"

To extend the list of words to remove for one language:

URLify::remove_words(array('remove', 'these', 'too'), 'de');

To prioritize a certain language map:

echo URLify::filter(' Ägypten und Österreich besitzen wie üblich ein Übermaß an ähnlich öligen Attachés ', 60, 'de');
// "Aegypten-und-Oesterreich-besitzen-wie-ueblich-ein-Uebermass-aehnlich-oeligen-Attaches"

echo URLify::filter('Cağaloğlu, çalıştığı, müjde, lazım, mahkûm', 60, 'tr');
// "Cagaloglu-calistigi-mujde-lazim-mahkum"

Please note that the "ü" is transliterated to "ue" in the first case, whereas it results in a simple "u" in the latter., (*5)

Available languages

  • Arabic: 'ar'
  • Austrian (German): 'de_at'
  • Austrian (French): 'fr_at'
  • Azerbaijani: 'az'
  • Bulgarian: 'bg'
  • Burmese: 'by'
  • Croatian: 'hr'
  • Czech: 'cs'
  • Danish: 'da'
  • English: 'en'
  • Esperanto: 'eo'
  • Estonian: 'et'
  • Finnish: 'fi'
  • French: 'fr'
  • Georgian: 'ka'
  • German: 'de'
  • Greek: 'el'
  • Hindi: 'hi'
  • Hungarian: 'hu'
  • Kazakh: 'kk'
  • Latvian: 'lv'
  • Lithuanian: 'lt'
  • Norwegian: 'no'
  • Polish: 'pl'
  • Romanian: 'ro'
  • Russian: 'ru'
  • Serbian: 'sr'
  • Slovak: 'sk'
  • Swedish: 'sv'
  • Switzerland (German): 'de_ch'
  • Switzerland (French): 'fr_ch'
  • Turkish: 'tr'
  • Ukrainian: 'uk'
  • Vietnamese: 'vn'

Support

For support and donations please visit Github | Issues | PayPal | Patreon., (*6)

For status updates and release announcements please visit Releases | Twitter | Patreon., (*7)

For professional support please contact me., (*8)

Thanks

  • Thanks to GitHub (Microsoft) for hosting the code and a good infrastructure including Issues-Managment, etc.
  • Thanks to IntelliJ as they make the best IDEs for PHP and they gave me an open source license for PhpStorm!
  • Thanks to Travis CI for being the most awesome, easiest continous integration tool out there!
  • Thanks to StyleCI for the simple but powerfull code style check.
  • Thanks to PHPStan && Psalm for relly great Static analysis tools and for discover bugs in the code!

The Versions

23/12 2017

dev-master

9999999-dev https://github.com/voku/urlify

PHP port of URLify.js from the Django project. Transliterates non-ascii characters for use in URLs.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

url link encode translit slug urlify transliteration iconv transliterate

23/12 2017

4.0.0

4.0.0.0 https://github.com/voku/urlify

PHP port of URLify.js from the Django project. Transliterates non-ascii characters for use in URLs.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

url link encode translit slug urlify transliteration iconv transliterate

01/12 2017

3.0.0

3.0.0.0 https://github.com/voku/urlify

PHP port of URLify.js from the Django project. Transliterates non-ascii characters for use in URLs.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

url link encode translit slug urlify transliteration iconv transliterate

25/06 2017

2.3.1

2.3.1.0 https://github.com/voku/urlify

PHP port of URLify.js from the Django project. Transliterates non-ascii characters for use in URLs.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

url link encode translit slug urlify transliteration iconv transliterate

22/05 2017

2.3.0

2.3.0.0 https://github.com/voku/urlify

PHP port of URLify.js from the Django project. Transliterates non-ascii characters for use in URLs.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

url link encode translit slug urlify transliteration iconv transliterate

18/03 2017

2.2.1

2.2.1.0 https://github.com/voku/urlify

PHP port of URLify.js from the Django project. Transliterates non-ascii characters for use in URLs.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

url link encode translit slug urlify transliteration iconv transliterate

18/03 2017

2.2.0

2.2.0.0 https://github.com/voku/urlify

PHP port of URLify.js from the Django project. Transliterates non-ascii characters for use in URLs.

  Sources   Download

MIT

The Requires

 

The Development Requires

url link encode translit slug urlify transliteration iconv transliterate

11/03 2017

2.1.2

2.1.2.0 https://github.com/voku/urlify

PHP port of URLify.js from the Django project. Transliterates non-ascii characters for use in URLs.

  Sources   Download

MIT

The Requires

 

The Development Requires

url link encode translit slug urlify transliteration iconv transliterate

03/02 2017

2.1.1

2.1.1.0 https://github.com/voku/urlify

PHP port of URLify.js from the Django project. Transliterates non-ascii characters for use in URLs.

  Sources   Download

MIT

The Requires

 

The Development Requires

url link encode translit slug urlify transliteration iconv transliterate

02/02 2017

dev-analysis-qJg5da

dev-analysis-qJg5da https://github.com/voku/urlify

PHP port of URLify.js from the Django project. Transliterates non-ascii characters for use in URLs.

  Sources   Download

MIT

The Requires

 

The Development Requires

url link encode translit slug urlify transliteration iconv transliterate

02/02 2017

2.1.0

2.1.0.0 https://github.com/voku/urlify

PHP port of URLify.js from the Django project. Transliterates non-ascii characters for use in URLs.

  Sources   Download

MIT

The Requires

 

The Development Requires

url link encode translit slug urlify transliteration iconv transliterate

10/11 2016

2.0.8

2.0.8.0 https://github.com/voku/urlify

PHP port of URLify.js from the Django project. Transliterates non-ascii characters for use in URLs.

  Sources   Download

MIT

The Requires

 

The Development Requires

url link encode translit slug urlify transliteration iconv transliterate

18/08 2016

2.0.7

2.0.7.0 https://github.com/voku/urlify

PHP port of URLify.js from the Django project. Transliterates non-ascii characters for use in URLs.

  Sources   Download

MIT

The Requires

 

The Development Requires

url link encode translit slug urlify transliteration iconv transliterate

17/08 2016

2.0.6

2.0.6.0 https://github.com/voku/urlify

PHP port of URLify.js from the Django project. Transliterates non-ascii characters for use in URLs.

  Sources   Download

MIT

The Requires

 

The Development Requires

url link encode translit slug urlify transliteration iconv transliterate

12/08 2016

2.0.5-stable

2.0.5.0 https://github.com/voku/urlify

PHP port of URLify.js from the Django project. Transliterates non-ascii characters for use in URLs.

  Sources   Download

MIT

The Requires

 

The Development Requires

url link encode translit slug urlify transliteration iconv transliterate

12/08 2016

2.0.4-stable

2.0.4.0 https://github.com/voku/urlify

PHP port of URLify.js from the Django project. Transliterates non-ascii characters for use in URLs.

  Sources   Download

MIT

The Requires

 

The Development Requires

url link encode translit slug urlify transliteration iconv transliterate

20/07 2016

2.0.3-stable

2.0.3.0 https://github.com/voku/urlify

PHP port of URLify.js from the Django project. Transliterates non-ascii characters for use in URLs.

  Sources   Download

MIT

The Requires

 

The Development Requires

url link encode translit slug urlify transliteration iconv transliterate

23/12 2015

2.0.2-stable

2.0.2.0 https://github.com/voku/urlify

PHP port of URLify.js from the Django project. Transliterates non-ascii characters for use in URLs.

  Sources   Download

MIT

The Requires

 

The Development Requires

url link encode translit slug urlify transliteration iconv transliterate

08/11 2015

2.0.1-stable

2.0.1.0 https://github.com/voku/urlify

PHP port of URLify.js from the Django project. Transliterates non-ascii characters for use in URLs.

  Sources   Download

MIT

The Requires

 

The Development Requires

url link encode translit slug urlify transliteration iconv transliterate

30/10 2015

dev-analysis-qxa3bz

dev-analysis-qxa3bz https://github.com/voku/urlify

PHP port of URLify.js from the Django project. Transliterates non-ascii characters for use in URLs.

  Sources   Download

MIT

The Requires

 

The Development Requires

url link encode translit slug urlify transliteration iconv transliterate

30/10 2015

2.0.0-stable

2.0.0.0 https://github.com/voku/urlify

PHP port of URLify.js from the Django project. Transliterates non-ascii characters for use in URLs.

  Sources   Download

MIT

The Requires

 

The Development Requires

url link encode translit slug urlify transliteration iconv transliterate

26/10 2015

1.3.0-stable

1.3.0.0 https://github.com/voku/urlify

PHP port of URLify.js from the Django project. Transliterates non-ascii characters for use in URLs.

  Sources   Download

MIT

The Requires

 

The Development Requires

url link encode translit slug urlify transliteration iconv transliterate

23/10 2015

1.2.14-stable

1.2.14.0 https://github.com/voku/urlify

PHP port of URLify.js from the Django project. Transliterates non-ascii characters for use in URLs.

  Sources   Download

MIT

The Requires

 

The Development Requires

url link encode translit slug urlify transliteration iconv transliterate

16/10 2015

dev-analysis-qBY9rX

dev-analysis-qBY9rX https://github.com/voku/urlify

PHP port of URLify.js from the Django project. Transliterates non-ascii characters for use in URLs.

  Sources   Download

MIT

The Requires

 

The Development Requires

url link encode translit slug urlify transliteration iconv transliterate

16/10 2015

1.2.13-stable

1.2.13.0 https://github.com/voku/urlify

PHP port of URLify.js from the Django project. Transliterates non-ascii characters for use in URLs.

  Sources   Download

MIT

The Requires

 

The Development Requires

url link encode translit slug urlify transliteration iconv transliterate

16/10 2015

dev-analysis-XZPDaz

dev-analysis-XZPDaz https://github.com/voku/urlify

PHP port of URLify.js from the Django project. Transliterates non-ascii characters for use in URLs.

  Sources   Download

MIT

The Requires

 

The Development Requires

url link encode translit slug urlify transliteration iconv transliterate

18/09 2015

1.2.12-stable

1.2.12.0 https://github.com/voku/urlify

PHP port of URLify.js from the Django project. Transliterates non-ascii characters for use in URLs.

  Sources   Download

MIT

The Requires

 

The Development Requires

url link encode translit slug urlify transliteration iconv transliterate

18/09 2015

1.2.11-stable

1.2.11.0 https://github.com/voku/urlify

PHP port of URLify.js from the Django project. Transliterates non-ascii characters for use in URLs.

  Sources   Download

MIT

The Requires

 

The Development Requires

url link encode translit slug urlify transliteration iconv transliterate

20/08 2015

1.2.10-stable

1.2.10.0 https://github.com/voku/urlify

PHP port of URLify.js from the Django project. Transliterates non-ascii characters for use in URLs.

  Sources   Download

MIT

The Requires

 

The Development Requires

url link encode translit slug urlify transliteration iconv transliterate

19/08 2015

dev-analysis-86LG9q

dev-analysis-86LG9q https://github.com/voku/urlify

PHP port of URLify.js from the Django project. Transliterates non-ascii characters for use in URLs.

  Sources   Download

MIT

The Requires

 

The Development Requires

url link encode translit slug urlify transliteration iconv transliterate

13/08 2015

1.2.9-stable

1.2.9.0 https://github.com/voku/urlify

PHP port of URLify.js from the Django project. Transliterates non-ascii characters for use in URLs.

  Sources   Download

MIT

The Requires

 

The Development Requires

url link encode translit slug urlify transliteration iconv transliterate

27/07 2015

1.2.8-stable

1.2.8.0 https://github.com/voku/urlify

PHP port of URLify.js from the Django project. Transliterates non-ascii characters for use in URLs.

  Sources   Download

MIT

The Requires

 

The Development Requires

url link encode translit slug urlify transliteration iconv transliterate

24/07 2015

1.2.7-stable

1.2.7.0 https://github.com/voku/urlify

PHP port of URLify.js from the Django project. Transliterates non-ascii characters for use in URLs.

  Sources   Download

MIT

The Requires

 

The Development Requires

url link encode translit slug urlify transliteration iconv transliterate

28/06 2015

1.2.6-stable

1.2.6.0 https://github.com/voku/urlify

PHP port of URLify.js from the Django project. Transliterates non-ascii characters for use in URLs.

  Sources   Download

MIT

The Requires

 

The Development Requires

url link encode translit slug urlify transliteration iconv transliterate

23/04 2015

1.2.5-stable

1.2.5.0 https://github.com/voku/urlify

PHP port of URLify.js from the Django project. Transliterates non-ascii characters for use in URLs.

  Sources   Download

MIT

The Requires

 

The Development Requires

url link encode translit slug urlify transliteration iconv transliterate

13/03 2015

1.2.4-stable

1.2.4.0 https://github.com/voku/urlify

PHP port of URLify.js from the Django project. Transliterates non-ascii characters for use in URLs.

  Sources   Download

MIT

The Requires

 

The Development Requires

url link encode translit slug urlify transliteration iconv transliterate

03/03 2015

1.2.3-stable

1.2.3.0 https://github.com/voku/urlify

PHP port of URLify.js from the Django project. Transliterates non-ascii characters for use in URLs.

  Sources   Download

MIT

The Requires

 

The Development Requires

url link encode translit slug urlify transliteration iconv transliterate

18/02 2015

1.2.2-stable

1.2.2.0 https://github.com/voku/urlify

PHP port of URLify.js from the Django project. Transliterates non-ascii characters for use in URLs.

  Sources   Download

MIT

The Requires

 

The Development Requires

url link encode translit slug urlify transliteration iconv transliterate

13/02 2015

1.2.1-stable

1.2.1.0 https://github.com/voku/urlify

PHP port of URLify.js from the Django project. Transliterates non-ascii characters for use in URLs.

  Sources   Download

MIT

The Requires

 

The Development Requires

url link encode translit slug urlify transliteration iconv transliterate

12/02 2015

1.2.0-stable

1.2.0.0 https://github.com/voku/urlify

PHP port of URLify.js from the Django project. Transliterates non-ascii characters for use in URLs.

  Sources   Download

MIT

The Requires

 

The Development Requires

url link encode translit slug urlify transliteration iconv transliterate

11/02 2015

1.1.1-stable

1.1.1.0 https://github.com/voku/urlify

PHP port of URLify.js from the Django project. Transliterates non-ascii characters for use in URLs.

  Sources   Download

MIT

The Requires

 

The Development Requires

url link encode translit slug urlify transliteration iconv transliterate

11/02 2015

1.1.0-stable

1.1.0.0 https://github.com/voku/urlify

PHP port of URLify.js from the Django project. Transliterates non-ascii characters for use in URLs.

  Sources   Download

MIT

The Requires

 

The Development Requires

url link encode translit slug urlify transliteration iconv transliterate

10/02 2015

1.0.10-stable

1.0.10.0 https://github.com/voku/urlify

PHP port of URLify.js from the Django project. Transliterates non-ascii characters for use in URLs.

  Sources   Download

MIT

The Requires

 

The Development Requires

url link encode translit slug urlify transliteration iconv transliterate

08/02 2015

1.0.9-stable

1.0.9.0 https://github.com/voku/urlify

PHP port of URLify.js from the Django project. Transliterates non-ascii characters for use in URLs.

  Sources   Download

MIT

The Requires

 

The Development Requires

url link encode translit slug urlify transliteration iconv transliterate

07/02 2015

1.0.8-stable

1.0.8.0 https://github.com/voku/urlify

PHP port of URLify.js from the Django project. Transliterates non-ascii characters for use in URLs.

  Sources   Download

MIT

The Requires

 

The Development Requires

url link encode translit slug urlify transliteration iconv transliterate

07/02 2015

1.0.7-stable

1.0.7.0 https://github.com/voku/urlify

PHP port of URLify.js from the Django project. Transliterates non-ascii characters for use in URLs.

  Sources   Download

MIT

The Requires

 

The Development Requires

url link encode translit slug urlify transliteration iconv transliterate

07/02 2015

1.0.6-stable

1.0.6.0 https://github.com/voku/urlify

PHP port of URLify.js from the Django project. Transliterates non-ascii characters for use in URLs.

  Sources   Download

MIT

The Requires

 

The Development Requires

url link encode translit slug urlify transliteration iconv transliterate

28/01 2015

1.0.5-stable

1.0.5.0 https://github.com/voku/urlify

PHP port of URLify.js from the Django project. Transliterates non-ascii characters for use in URLs.

  Sources   Download

MIT

The Requires

  • php >=5.3

 

The Development Requires

url link encode translit slug urlify transliteration iconv transliterate

28/01 2015

1.0.4-stable

1.0.4.0 https://github.com/voku/urlify

PHP port of URLify.js from the Django project. Transliterates non-ascii characters for use in URLs.

  Sources   Download

MIT

The Requires

  • php >=5.3

 

The Development Requires

url link encode translit slug urlify transliteration iconv transliterate

28/01 2015

1.0.3-stable

1.0.3.0 https://github.com/voku/urlify

PHP port of URLify.js from the Django project. Transliterates non-ascii characters for use in URLs.

  Sources   Download

MIT

The Requires

 

The Development Requires

url link encode translit slug urlify transliteration iconv transliterate

07/12 2014

1.0.2-stable

1.0.2.0 https://github.com/voku/urlify

PHP port of URLify.js from the Django project. Transliterates non-ascii characters for use in URLs.

  Sources   Download

MIT

The Requires

  • php >=5.3

 

url link encode translit slug urlify transliteration iconv transliterate

16/10 2013

1.0.1-stable

1.0.1.0 https://github.com/jbroadway/urlify

PHP port of URLify.js from the Django project. Transliterates non-ascii characters for use in URLs.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

url link encode translit slug urlify transliteration iconv transliterate

11/02 2013

1.0.0-stable

1.0.0.0 https://github.com/jbroadway/urlify

PHP port of URLify.js from the Django project. Transliterates non-ascii characters for use in URLs.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

url link encode translit slug urlify transliteration iconv transliterate