1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-30 21:40:43 +02:00

Merge branch '3.3.x'

This commit is contained in:
Marc Alexander
2025-06-15 09:10:57 +02:00
3 changed files with 21 additions and 1 deletions

View File

@@ -65,6 +65,8 @@ class language_file_helper
$available_languages[] = $this->get_language_data_from_json($data);
}
usort($available_languages, [$this, 'sort_by_local_name']);
return $available_languages;
}
@@ -123,4 +125,14 @@ class language_file_helper
'turnstile_lang' => $data['extra']['turnstile-lang'] ?? '',
];
}
/**
* Sorts the languages by their name instead of iso code
*
* @return array
*/
private static function sort_by_local_name($a, $b)
{
return $a['local_name'] > $b['local_name'];
}
}