Skip to content
Snippets Groups Projects
Commit 2180a4c4 authored by Robin Appelman's avatar Robin Appelman
Browse files

-L10N: cache the result of findLanguage

parent 6cf36b4f
No related branches found
No related tags found
No related merge requests found
......@@ -298,10 +298,16 @@ class OC_L10N{
$temp = explode(';', $i);
$temp[0] = str_replace('-', '_', $temp[0]);
if( ($key = array_search($temp[0], $available)) !== false) {
if (is_null($app)) {
self::$language = $available[$key];
}
return $available[$key];
}
foreach($available as $l) {
if ( $temp[0] == substr($l, 0, 2) ) {
if (is_null($app)) {
self::$language = $l;
}
return $l;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment