Skip to content

Commit

Permalink
Improved Greek transliteration
Browse files Browse the repository at this point in the history
  • Loading branch information
plazarid committed Jun 11, 2015
1 parent fb0e49e commit 9d70544
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
10 changes: 5 additions & 5 deletions src/Slugifier.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',

Expand Down
2 changes: 1 addition & 1 deletion tests/SlugifierTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
);
}
Expand Down

0 comments on commit 9d70544

Please sign in to comment.