If the locale in your system is set correctly then you can use localeCompare
method instead of greater-than operator to compare the strings – this method is locale aware.
function sortComparer(a,b){
return a.title.localeCompare(b.title)
};
If the locale in your system is set correctly then you can use localeCompare
method instead of greater-than operator to compare the strings – this method is locale aware.
function sortComparer(a,b){
return a.title.localeCompare(b.title)
};