diff --git a/system/src/Grav/Common/Page/Pages.php b/system/src/Grav/Common/Page/Pages.php index a8aef9b32..d8bf52f84 100644 --- a/system/src/Grav/Common/Page/Pages.php +++ b/system/src/Grav/Common/Page/Pages.php @@ -1060,7 +1060,12 @@ protected function buildSort($path, array $pages, $order_by = 'default', $manual $list = $this->arrayShuffle($list); } else { // else just sort the list according to specified key - asort($list, $sort_flags); + if (extension_loaded('intl')) { + $col = new \Collator(setlocale(LC_COLLATE, 0)); //`setlocale` with a 0 param returns the current locale set + $col->asort($list, $sort_flags); + } else { + asort($list, $sort_flags); + } }