From b65322ab54982b1d95d31800ecb1d232a1c2f415 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 31 Oct 2024 18:03:58 +0100 Subject: [PATCH] use only first two chars of language in html lang attribute --- views/bootstrap/class.Bootstrap.php | 6 ++++-- views/bootstrap4/class.Bootstrap4.php | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php index 24bd2e592..b5bda7231 100644 --- a/views/bootstrap/class.Bootstrap.php +++ b/views/bootstrap/class.Bootstrap.php @@ -101,9 +101,11 @@ class SeedDMS_Theme_Style extends SeedDMS_View_Common { echo "\n"; echo "params['session']) && ($slang = $this->params['session']->getLanguage())) { - echo str_replace('_', '-', $slang); + echo substr($slang, 0, 2); +// echo str_replace('_', '-', $slang); } else { - echo str_replace('_', '-', $this->params['settings']->_language); + echo substr($this->params['settings']->_language, 0, 2); +// echo str_replace('_', '-', $this->params['settings']->_language); } echo "\">\n\n"; echo "\n"; diff --git a/views/bootstrap4/class.Bootstrap4.php b/views/bootstrap4/class.Bootstrap4.php index 63514c45b..e591e13de 100644 --- a/views/bootstrap4/class.Bootstrap4.php +++ b/views/bootstrap4/class.Bootstrap4.php @@ -103,9 +103,11 @@ class SeedDMS_Theme_Style extends SeedDMS_View_Common { echo "\n"; echo "params['session']) && ($slang = $this->params['session']->getLanguage())) { - echo str_replace('_', '-', $slang); + echo substr($slang, 0, 2); +// echo str_replace('_', '-', $slang); } else { - echo str_replace('_', '-', $this->params['settings']->_language); + echo substr($this->params['settings']->_language, 0, 2); +// echo str_replace('_', '-', $this->params['settings']->_language); } echo "\">\n\n"; echo "\n";