mirror of
https://github.com/nextcloud/server.git
synced 2026-02-20 00:12:30 -05:00
parent
75367f91e0
commit
b810e42cc7
1 changed files with 8 additions and 2 deletions
10
lib/l10n.php
10
lib/l10n.php
|
|
@ -294,8 +294,14 @@ class OC_L10N{
|
|||
}
|
||||
foreach($accepted_languages as $i) {
|
||||
$temp = explode(';', $i);
|
||||
if(array_search($temp[0], $available) !== false) {
|
||||
return $temp[0];
|
||||
$temp[0] = str_replace('-','_',$temp[0]);
|
||||
if( ($key = array_search($temp[0], $available)) !== false) {
|
||||
return $available[$key];
|
||||
}
|
||||
}
|
||||
foreach($available as $l) {
|
||||
if ( $temp[0] == substr($l,0,2) ) {
|
||||
return $l;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue