]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fixing undefined $language
authorThomas Müller <thomas.mueller@tmit.eu>
Mon, 22 Oct 2012 14:09:34 +0000 (17:09 +0300)
committerThomas Müller <thomas.mueller@tmit.eu>
Mon, 22 Oct 2012 14:09:34 +0000 (17:09 +0300)
lib/l10n.php

index 26611537175ddcd2ed8fd059fe4ab5eb28c9017b..ac57115da4ebb2f8ec18134b73e6484dcbeac2da 100644 (file)
@@ -217,7 +217,9 @@ class OC_L10N{
                                if($data instanceof DateTime) return $data->format($this->localizations[$type]);
                                elseif(is_string($data)) $data = strtotime($data);
                                $locales = array(self::findLanguage());
-                               if (strlen($locales[0]) == 2) $locales[] = $language.'_'.strtoupper($language);
+                               if (strlen($locales[0]) == 2) {
+                                       $locales[] = $locales[0].'_'.strtoupper($locales[0]);
+                               }
                                setlocale(LC_TIME, $locales);
                                return strftime($this->localizations[$type], $data);
                                break;