diff options
-rw-r--r-- | lib/private/L10N/Factory.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/private/L10N/Factory.php b/lib/private/L10N/Factory.php index 7361ab1a9dd..6de620e7ec7 100644 --- a/lib/private/L10N/Factory.php +++ b/lib/private/L10N/Factory.php @@ -495,7 +495,7 @@ class Factory implements IFactory { if ($preferred_language === strtolower($available_language)) { return $this->respectDefaultLanguage($app, $available_language); } - if ($preferred_language_parts[0].'_'.$preferred_language_parts[count($preferred_language_parts) - 1] === strtolower($available_language)) { + if ($preferred_language_parts[0].'_'.end($preferred_language_parts) === strtolower($available_language)) { return $available_language; } } |