From 7b0e2b348b3ad5b4351c37cc91531718773c3864 Mon Sep 17 00:00:00 2001 From: Sergi Almacellas Abellana Date: Sun, 9 Dec 2012 20:21:04 +0100 Subject: [PATCH] Fix the loop to search al the available languages, not only the las element. --- lib/l10n.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/l10n.php b/lib/l10n.php index 4f9c3a0ede..b83d8ff86d 100644 --- a/lib/l10n.php +++ b/lib/l10n.php @@ -298,10 +298,10 @@ 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; + foreach($available as $l) { + if ( $temp[0] == substr($l,0,2) ) { + return $l; + } } } }