strcoll()期望参数1是uasort()中的字符串

I need to sort an array that contains strings from different languages. The best way I found is the following:

setlocale(LC_COLLATE, 'tr_TR.utf8'); // or any other locale I use.
uasort($aInput['values'],'strcoll');

Even though uasort works perfectly, it has problems with integers and shows the warning:

strcoll() expects parameter 1 to be string

Should I be loop the whole array and cast integer values to string before calling uasort or is there any other way?

You can try to sort it multi-dimensional using locale settings.

array_multisort($aInput['values'], SORT_LOCALE_STRING);