Skip to content
Snippets Groups Projects
Commit daf93c45 authored by Andreas Fischer's avatar Andreas Fischer
Browse files

Sort, so 'de' is preferred over 'de_DE' when performing non-exact matching.

parent c14b470e
No related branches found
No related tags found
No related merge requests found
......@@ -458,6 +458,10 @@ class OC_L10N implements \OCP\IL10N {
} else {
$available = self::findAvailableLanguages($app);
}
// E.g. make sure that 'de' is before 'de_DE'.
sort($available);
$preferences = preg_split('/,\s*/', strtolower($_SERVER['HTTP_ACCEPT_LANGUAGE']));
foreach($preferences as $preference) {
list($prefered_language) = explode(';', $preference);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment