Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorscambra <sergio@entrecables.com>2012-09-26 09:10:54 +0400
committerscambra <sergio@entrecables.com>2012-10-16 22:31:46 +0400
commitd8eb62232e2b3003925c87b316b66ed6b39ff100 (patch)
treed9a57d3b4414ea8757b5270f6ae280c5e3984853 /lib/l10n.php
parent5ecce8bfb7e615b4b0576ff28d21e5b8a5d68878 (diff)
don't duplicate locales with country code
Diffstat (limited to 'lib/l10n.php')
-rw-r--r--lib/l10n.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/l10n.php b/lib/l10n.php
index 7df01ced72f..26611537175 100644
--- a/lib/l10n.php
+++ b/lib/l10n.php
@@ -216,8 +216,9 @@ class OC_L10N{
case 'time':
if($data instanceof DateTime) return $data->format($this->localizations[$type]);
elseif(is_string($data)) $data = strtotime($data);
- $language = self::findLanguage();
- setlocale(LC_TIME, array($language, $language.'_'.strtoupper($language)));
+ $locales = array(self::findLanguage());
+ if (strlen($locales[0]) == 2) $locales[] = $language.'_'.strtoupper($language);
+ setlocale(LC_TIME, $locales);
return strftime($this->localizations[$type], $data);
break;
default: