Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved Greek language support. #71

Merged
merged 1 commit into from
Aug 21, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
84 changes: 65 additions & 19 deletions src/Slugify.php
Original file line number Diff line number Diff line change
Expand Up @@ -363,13 +363,52 @@ class Slugify implements SlugifyInterface
'ż' => 'z',

// Greek
'ΑΥ' => 'AU',
'Αυ' => 'Au',
'ΟΥ' => 'OU',
'Ου' => 'Ou',
'ΕΥ' => 'EU',
'Ευ' => 'Eu',
'ΕΙ' => 'I',
'Ει' => 'I',
'ΟΙ' => 'I',
'Οι' => 'I',
'ΥΙ' => 'I',
'Υι' => 'I',
'ΑΎ' => 'AU',
'Αύ' => 'Au',
'ΟΎ' => 'OU',
'Ού' => 'Ou',
'ΕΎ' => 'EU',
'Εύ' => 'Eu',
'ΕΊ' => 'I',
'Εί' => 'I',
'ΟΊ' => 'I',
'Οί' => 'I',
'ΎΙ' => 'I',
'Ύι' => 'I',
'ΥΊ' => 'I',
'Υί' => 'I',
'αυ' => 'au',
'ου' => 'ou',
'ευ' => 'eu',
'ει' => 'i',
'οι' => 'i',
'υι' => 'i',
'αύ' => 'au',
'ού' => 'ou',
'εύ' => 'eu',
'εί' => 'i',
'οί' => 'i',
'ύι' => 'i',
'υί' => 'i',
'Α' => 'A',
'Β' => 'B',
'Β' => 'V',
'Γ' => 'G',
'Δ' => 'D',
'Ε' => 'E',
'Ζ' => 'Z',
'Η' => 'E',
'Η' => 'I',
'Θ' => 'Th',
'Ι' => 'I',
'Κ' => 'K',
Expand All @@ -382,25 +421,28 @@ class Slugify implements SlugifyInterface
'Ρ' => 'R',
'Σ' => 'S',
'Τ' => 'T',
'Υ' => 'Y',
'Φ' => 'Ph',
'Υ' => 'I',
'Φ' => 'F',
'Χ' => 'Ch',
'Ψ' => 'Ps',
'Ω' => 'O',
'Ά' => 'A',
'Έ' => 'E',
'Ή' => 'I',
'Ί' => 'I',
'Ό' => 'O',
'Ύ' => 'I',
'Ϊ' => 'I',
'Ϋ' => 'Y',
'ά' => 'a',
'έ' => 'e',
'ή' => 'e',
'ί' => 'i',
'ΰ' => 'Y',
'Ϊ' => 'I',
'Ϋ' => 'I',
'ϒ' => 'I',
'α' => 'a',
'β' => 'b',
'β' => 'v',
'γ' => 'g',
'δ' => 'd',
'ε' => 'e',
'ζ' => 'z',
'η' => 'e',
'η' => 'i',
'θ' => 'th',
'ι' => 'i',
'κ' => 'k',
Expand All @@ -414,19 +456,23 @@ class Slugify implements SlugifyInterface
'ς' => 's',
'σ' => 's',
'τ' => 't',
'υ' => 'y',
'φ' => 'ph',
'υ' => 'i',
'φ' => 'f',
'χ' => 'ch',
'ψ' => 'ps',
'ω' => 'o',
'ϊ' => 'i',
'ϋ' => 'y',
'ά' => 'a',
'έ' => 'e',
'ή' => 'i',
'ί' => 'i',
'ό' => 'o',
'ύ' => 'y',
'ύ' => 'i',
'ϊ' => 'i',
'ϋ' => 'i',
'ΰ' => 'i',
'ώ' => 'o',
'ϐ' => 'b',
'ϐ' => 'v',
'ϑ' => 'th',
'ϒ' => 'Y',

/* Arabic */
'أ' => 'a',
Expand Down
2 changes: 1 addition & 1 deletion tests/SlugifyTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ public function provider()
array('Блоґ їжачка', 'blog-jizhachka'),
array('фильм', 'film'),
array('драма', 'drama'),
array('ελληνικά', 'ellenika'),
array('Ύπαρξη Αυτής η Σκουληκομυρμηγκότρυπα', 'iparxi-autis-i-skoulikomirmigkotripa'),
array('C’est du français !', 'c-est-du-francais'),
array('هذه هي اللغة العربية', 'hthh-hy-llgh-laarby'),
array('مرحبا العالم', 'mrhb-laa-lm'),
Expand Down