Skip to content

Commit

Permalink
Update lib/private/L10N/Factory.php
Browse files Browse the repository at this point in the history
Co-authored-by: Ferdinand Thiessen <opensource@fthiessen.de>
Signed-off-by: c39cfbb3 <145777845+c39cfbb3@users.noreply.github.com>
  • Loading branch information
c39cfbb3 and susnux committed Oct 18, 2023
1 parent f7cd3d1 commit 1bf15da
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/private/L10N/Factory.php
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@ private function getLanguageFromRequest(?string $app = null): string {
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;
}
}
Expand Down

0 comments on commit 1bf15da

Please sign in to comment.