Код: Выделить всё
$lang["ko"] = "coreano"; //korean
$lang["ar"] = "árabe"; //arabic
$lang["es"] = "español"; //spanish
$lang["fr"] = "francés"; //french
Код: Выделить всё
setlocale(LC_ALL,'es_ES.UTF-8'); //this is at the beginning (config file)
asort($lang,SORT_LOCALE_STRING);
print_r($lang);
- Массив ( [ar ] => árabe [ko] => coreano [es] => español [fr] => francés )
- Array ( [ko] => coreano [es] => español [fr] => francés [ar ] => árabe )
Подробнее здесь: https://stackoverflow.com/questions/106 ... ers-in-php