From bd90759921ed0c458a54a5cb4279b444c79acc9e Mon Sep 17 00:00:00 2001 From: Samer Halawani Date: Mon, 1 Jun 2015 00:23:54 +0300 Subject: [PATCH] extend special_letters object for all Turkish letters --- sorting/turkish-string.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/sorting/turkish-string.js b/sorting/turkish-string.js index 0c1ee5f..e2d570a 100644 --- a/sorting/turkish-string.js +++ b/sorting/turkish-string.js @@ -17,7 +17,14 @@ jQuery.extend( jQuery.fn.dataTableExt.oSort, { "turkish-pre": function ( a ) { - var special_letters = { "İ": "ib", "I": "ia", "Ş": "sa", "Ğ": "ga", "Ü": "ua", "Ö": "oa", "Ç": "ca", "i": "ia", "ı": "ia", "ş": "sa", "ğ": "ga", "ü": "ua", "ö": "oa", "ç": "ca" }; + var special_letters = { + "C": "ca", "c": "ca", "Ç": "cb", "ç": "cb", + "G": "ga", "g": "ga", "Ğ": "gb", "ğ": "gb", + "I": "ia", "ı": "ia", "İ": "ib", "i": "ib", + "O": "oa", "o": "oa", "Ö": "ob", "ö": "ob", + "S": "sa", "s": "sa", "Ş": "sb", "ş": "sb", + "U": "ua", "u": "ua", "Ü": "ub", "ü": "ub" + }; for (var val in special_letters) a = a.split(val).join(special_letters[val]).toLowerCase(); return a;