From 08f3329d6820157d511f15b753a4f255cb8bc778 Mon Sep 17 00:00:00 2001 From: Tran Duy Hung Date: Wed, 10 May 2017 21:30:52 +0700 Subject: [PATCH] Added Vietnamese characters --- bl-kernel/helpers/text.class.php | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/bl-kernel/helpers/text.class.php b/bl-kernel/helpers/text.class.php index d4132ac4..da532f43 100644 --- a/bl-kernel/helpers/text.class.php +++ b/bl-kernel/helpers/text.class.php @@ -68,7 +68,34 @@ class Text { 'Ā'=>'A', 'Č'=>'C', 'Ē'=>'E', 'Ģ'=>'G', 'Ī'=>'i', 'Ķ'=>'k', 'Ļ'=>'L', 'Ņ'=>'N', 'Š'=>'S', 'Ū'=>'u', 'Ž'=>'Z', 'ā'=>'a', 'č'=>'c', 'ē'=>'e', 'ģ'=>'g', 'ī'=>'i', 'ķ'=>'k', 'ļ'=>'l', 'ņ'=>'n', - 'š'=>'s', 'ū'=>'u', 'ž'=>'z' + 'š'=>'s', 'ū'=>'u', 'ž'=>'z', + // Vietnamese + 'Ả'=>'A', 'Ạ'=>'A', + 'Ă'=>'A', 'Ằ'=>'A', 'Ắ'=>'A', 'Ẳ'=>'A', 'Ẵ'=>'A', 'Ặ'=>'A', + 'Ầ'=>'A', 'Ấ'=>'A', 'Ẩ'=>'A', 'Ẫ' => 'A', 'Ậ'=>'A', + 'Ẻ'=>'E', 'Ẽ'=>'E', 'Ẹ'=>'E', + 'Ề'=>'E', 'Ế'=>'E', 'Ể'=>'E', 'Ễ'=>'E', 'Ệ'=>'E', + 'Ỉ'=>'I', 'Ĩ'=>'I', 'Ị'=>'I', + 'Ỏ'=>'O', 'Ọ'=>'O', + 'Ơ'=>'O', 'Ờ'=>'O', 'Ớ'=>'O', 'Ở'=>'O', 'Ỡ'=>'O', 'Ợ'=>'O', + 'Ồ'=>'O', 'Ố'=>'O', 'Ổ'=>'O', 'Ỗ'=>'O', 'Ộ'=>'O', + 'Ư'=>'U', 'Ừ'=>'U', 'Ứ'=>'U', 'Ử'=>'U', 'Ữ'=>'U', 'Ự'=>'U', + 'Ủ'=>'U', 'Ũ'=>'U', + 'Ỳ'=>'Y', 'Ỷ'=>'Y', 'Ỹ'=>'Y', 'Ỵ' => 'Y', + 'Đ'=>'D', + 'ả'=>'a', 'ạ'=>'a', + 'ă'=>'a', 'ằ'=>'a', 'ắ'=>'a', 'ẳ'=>'a', 'ặ'=>'a', 'ẵ'=>'a', + 'ầ'=>'a', 'ấ'=>'a', 'ẩ'=>'a', 'ẫ' => 'a', 'ậ'=>'a', + 'ẻ'=>'e', 'ẽ'=>'e', 'ẹ'=>'e', + 'ề'=>'e', 'ế'=>'e', 'ể'=>'e', 'ễ'=>'e', 'ệ'=>'e', + 'ỉ'=>'i', 'ĩ'=>'i', 'ị'=>'i', + 'ỏ'=>'o', 'ọ'=>'o', + 'ơ'=>'o', 'ờ'=>'o', 'ớ'=>'o', 'ở'=>'o', 'ỡ'=>'o', 'ợ'=>'o', + 'ồ'=>'o', 'ố'=>'o', 'ổ'=>'o', 'ỗ'=>'o', 'ộ'=>'o', + 'ư'=>'u', 'ừ'=>'u', 'ứ'=>'u', 'ử'=>'u', 'ữ'=>'u', 'ự'=>'u', + 'ủ'=>'u', 'ũ'=>'u', + 'ỳ'=>'y', 'ỷ'=>'y', 'ỹ'=>'y', 'ỵ' => 'y', + 'đ'=>'d', ); public static function addSlashes($string, $begin=true, $end=true) @@ -220,4 +247,4 @@ class Text { $string); } -} \ No newline at end of file +}