diff options
Diffstat (limited to 'lib/private')
-rw-r--r-- | lib/private/L10N/Factory.php | 5 | ||||
-rw-r--r-- | lib/private/TemplateLayout.php | 2 |
2 files changed, 3 insertions, 4 deletions
diff --git a/lib/private/L10N/Factory.php b/lib/private/L10N/Factory.php index ea6360efdf0..a519ae7e761 100644 --- a/lib/private/L10N/Factory.php +++ b/lib/private/L10N/Factory.php @@ -377,9 +377,8 @@ class Factory implements IFactory { return in_array($lang, $languages); } - - public function getLanguageDirectionFromLocale(string $locale): string { - if (in_array($locale, self::RTL_LANGUAGES)) { + public function getLanguageDirection(string $language): string { + if (in_array($language, self::RTL_LANGUAGES, true)) { return 'rtl'; } diff --git a/lib/private/TemplateLayout.php b/lib/private/TemplateLayout.php index bca9af16d22..60c7526435e 100644 --- a/lib/private/TemplateLayout.php +++ b/lib/private/TemplateLayout.php @@ -196,7 +196,7 @@ class TemplateLayout extends \OC_Template { // Send the language, locale, and direction to our layouts $lang = \OC::$server->get(IFactory::class)->findLanguage(); $locale = \OC::$server->get(IFactory::class)->findLocale($lang); - $direction = \OC::$server->getL10NFactory()->getLanguageDirectionFromLocale($locale); + $direction = \OC::$server->getL10NFactory()->getLanguageDirection($lang); $lang = str_replace('_', '-', $lang); $this->assign('language', $lang); |