Skip to content

Commit

Permalink
Merge pull request #144 from vtluan36/laravel-5
Browse files Browse the repository at this point in the history
Adding Vietnamese charmap for making slug
  • Loading branch information
rtconner authored Sep 6, 2017
2 parents 179528b + ca47b3f commit a945f2e
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion src/Util.php
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,22 @@ public static function slug($str)
'š' => 's', 'ū' => 'u', 'ž' => 'z',

//Romanian
'Ă' => 'A', 'ă' => 'a', 'Ș' => 'S', 'ș' => 's', 'Ț' => 'T', 'ț' => 't'
'Ă' => 'A', 'ă' => 'a', 'Ș' => 'S', 'ș' => 's', 'Ț' => 'T', 'ț' => 't',

//Vietnamese
'' => 'a', '' => 'A','' => 'a', '' => 'A', '' => 'a', '' => 'A', '' => 'a', '' => 'A',
'' => 'a', '' => 'A', '' => 'a', '' => 'A', '' => 'a', '' => 'A', '' => 'a', '' => 'A',
'' => 'A', '' => 'a', '' => 'A', '' => 'a', 'Ơ' => 'O', 'ơ' => 'o', 'Đ' => 'D', 'đ' => 'd',
'' => 'a', '' => 'A', '' => 'a', '' => 'A', '' => 'e', '' => 'E', '' => 'e', '' => 'E',
'' => 'e', '' => 'E', 'ế' => 'e', '' => 'E', '' => 'e', '' => 'E', '' => 'e', '' => 'E',
'' => 'e', '' => 'E', '' => 'e', '' => 'E', '' => 'i', '' => 'I', 'ĩ' => 'i', 'Ĩ' => 'I',
'' => 'i', '' => 'I', '' => 'o', '' => 'O', '' => 'o', '' => 'O', '' => 'o', '' => 'O',
'' => 'o', '' => 'O', '' => 'o', '' => 'O', '' => 'o', '' => 'O', '' => 'o', '' => 'O',
'' => 'o', '' => 'O', '' => 'o', '' => 'O', '' => 'o', '' => 'O', '' => 'o', '' => 'O',
'' => 'o', '' => 'O', '' => 'u', '' => 'U', 'ũ' => 'u', 'Ũ' => 'U', '' => 'u', '' => 'U',
'ư' => 'u', 'Ư' => 'U', '' => 'u', '' => 'U', '' => 'u', '' => 'U', '' => 'u', '' => 'U',
'' => 'u', '' => 'U', '' => 'u', '' => 'U', '' => 'y', '' => 'Y', '' => 'y', '' => 'Y',
'' => 'y', '' => 'Y', '' => 'y', '' => 'Y'
);

// Make custom replacements
Expand Down

0 comments on commit a945f2e

Please sign in to comment.