remove this lang-uri fix.. put in custom code for now

Signed-off-by: Andy Miller <rhuk@mac.com>
This commit is contained in:
Andy Miller
2026-03-30 06:27:57 -06:00
parent c11d2bd867
commit cbb936d840

View File

@@ -249,26 +249,6 @@ class Language
// if languages set
if ($this->enabled()) {
// Check for explicit language override via ?lang= query parameter.
// This allows switching to any language (including the default language
// when include_default_lang is false and the URL has no language prefix).
$requestedLang = $_GET['lang'] ?? null;
if ($requestedLang) {
$requestedLang = strtolower($requestedLang);
if (in_array($requestedLang, $this->languages, true)) {
$this->setActive($requestedLang);
// Store in session.
if (isset($this->grav['session']) && $this->grav['session']->isStarted()
&& $this->config->get('system.languages.session_store_active', true)
) {
$this->grav['session']->active_language = $this->active;
}
return $uri;
}
}
// Try setting language from prefix of URL (/en/blah/blah).
if (preg_match($regex, $uri, $matches)) {
$this->lang_in_url = true;