Fix the loop to search al the available languages, not only the las element.
This commit is contained in:
parent
b810e42cc7
commit
7b0e2b348b
|
@ -298,13 +298,13 @@ class OC_L10N{
|
|||
if( ($key = array_search($temp[0], $available)) !== false) {
|
||||
return $available[$key];
|
||||
}
|
||||
}
|
||||
foreach($available as $l) {
|
||||
if ( $temp[0] == substr($l,0,2) ) {
|
||||
return $l;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Last try: English
|
||||
return 'en';
|
||||
|
|
Loading…
Reference in New Issue