diff --git a/src/Core/L10n/L10n.php b/src/Core/L10n/L10n.php index be9e1419f3..ad4f653716 100644 --- a/src/Core/L10n/L10n.php +++ b/src/Core/L10n/L10n.php @@ -413,6 +413,11 @@ class L10n */ public function withLang(string $lang) { + // Don't create a new instance for same language + if ($lang === $this->lang) { + return $this; + } + $newL10n = clone $this; $newL10n->loadTranslationTable($lang); return $newL10n;