From 9d70544b06462dd9d93416696b509b6e7ef4aa67 Mon Sep 17 00:00:00 2001 From: plazarid Date: Thu, 11 Jun 2015 18:40:43 +0300 Subject: [PATCH] Improved Greek transliteration --- README.md | 2 +- src/Slugifier.php | 10 +++++----- tests/SlugifierTest.php | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 6c6f142..f5693e0 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ composer require keyvanakbary/slugifier ```php echo \Slugifier::slugify('JúST å fëw wørds'); // just-a-few-words -echo \Slugifier::slugify('Αυτή είναι μια δοκιμή'); // ayte-einai-mia-dokime +echo \Slugifier::slugify('Αυτή είναι μια δοκιμή'); // ayti-einai-mia-dokimi echo \Slugifier::slugify('Wikipedia style', '_'); // wikipedia_style ``` diff --git a/src/Slugifier.php b/src/Slugifier.php index 1f12064..89a9245 100644 --- a/src/Slugifier.php +++ b/src/Slugifier.php @@ -26,12 +26,12 @@ class Slugifier 'ý' => 'y', 'ÿ' => 'y', 'ŷ' => 'y', // Greek - 'Α' => 'A', 'Β' => 'B', 'Γ' => 'G', 'Δ' => 'D', 'Ε' => 'E', 'Ζ' => 'Z', 'Η' => 'E', 'Θ' => 'Th', 'Ι' => 'I', - 'Κ' => 'K', 'Λ' => 'L', 'Μ' => 'M', 'Ν' => 'N', 'Ξ' => 'X', 'Ο' => 'O', 'Π' => 'P', 'Ρ' => 'R', 'Σ' => 'S', + 'Α' => 'A', 'Β' => 'B', 'Γ' => 'G', 'Δ' => 'D', 'Ε' => 'E', 'Ζ' => 'Z', 'Η' => 'I', 'Θ' => 'Th', 'Ι' => 'I', + 'Κ' => 'K', 'Λ' => 'L', 'Μ' => 'M', 'Ν' => 'N', 'Ξ' => 'Ks', 'Ο' => 'O', 'Π' => 'P', 'Ρ' => 'R', 'Σ' => 'S', 'Τ' => 'T', 'Υ' => 'Y', 'Φ' => 'Ph', 'Χ' => 'Ch', 'Ψ' => 'Ps', 'Ω' => 'O', 'Ϊ' => 'I', 'Ϋ' => 'Y', 'ά' => 'a', - 'έ' => 'e', 'ή' => 'e', 'ί' => 'i', 'ΰ' => 'Y', 'α' => 'a', 'β' => 'b', 'γ' => 'g', 'δ' => 'd', 'ε' => 'e', - 'ζ' => 'z', 'η' => 'e', 'θ' => 'th', 'ι' => 'i', 'κ' => 'k', 'λ' => 'l', 'μ' => 'm', 'ν' => 'n', 'ξ' => 'x', - 'ο' => 'o', 'π' => 'p', 'ρ' => 'r', 'ς' => 's', 'σ' => 's', 'τ' => 't', 'υ' => 'y', 'φ' => 'ph', 'χ' => 'ch', + 'έ' => 'e', 'ή' => 'i', 'ί' => 'i', 'ΰ' => 'Y', 'α' => 'a', 'β' => 'b', 'γ' => 'g', 'δ' => 'd', 'ε' => 'e', + 'ζ' => 'z', 'η' => 'i', 'θ' => 'th', 'ι' => 'i', 'κ' => 'k', 'λ' => 'l', 'μ' => 'm', 'ν' => 'n', 'ξ' => 'ks', + 'ο' => 'o', 'π' => 'p', 'ρ' => 'r', 'ς' => 's', 'σ' => 's', 'τ' => 't', 'υ' => 'y', 'φ' => 'ph', 'χ' => 'x', 'ψ' => 'ps', 'ω' => 'o', 'ϊ' => 'i', 'ϋ' => 'y', 'ό' => 'o', 'ύ' => 'y', 'ώ' => 'o', 'ϐ' => 'b', 'ϑ' => 'th', 'ϒ' => 'Y', diff --git a/tests/SlugifierTest.php b/tests/SlugifierTest.php index a816a51..b74a5bb 100644 --- a/tests/SlugifierTest.php +++ b/tests/SlugifierTest.php @@ -28,7 +28,7 @@ public function supportedStrings() array('Это тест', 'eto-test'), array('Це тест', 'ce-test'), array('Đây là một thử nghiệm', 'day-la-mot-thu-nghiem'), - array('Αυτή είναι μια δοκιμή', 'ayte-einai-mia-dokime'), + array('Αυτή είναι μια δοκιμή', 'ayti-einai-mia-dokimi'), array('°¹²³@¶', '0123atp'), ); }