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