mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
don't duplicate locales with country code
This commit is contained in:
parent
5ecce8bfb7
commit
d8eb62232e
1 changed files with 3 additions and 2 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Reference in a new issue