Skip to content

Commit

Permalink
Fix: languages and error displays
Browse files Browse the repository at this point in the history
  • Loading branch information
jeph864 committed Dec 10, 2024
1 parent dabcef3 commit 183e7cc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
7 changes: 6 additions & 1 deletion guest.php
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,12 @@ private function txt(string $value): string
private function setUserLangBySvrParam(): void
{
if( isset($this->dic->http()->request()->getServerParams()['HTTP_ACCEPT_LANGUAGE']) && strlen($this->dic->http()->request()->getServerParams()['HTTP_ACCEPT_LANGUAGE']) >= 2 ) {
$this->userLang = substr($this->dic->http()->request()->getServerParams()['HTTP_ACCEPT_LANGUAGE'], 0, 2);
$lang = substr($this->dic->http()->request()->getServerParams()['HTTP_ACCEPT_LANGUAGE'], 0, 2);
if (in_array($lang, ilLanguage::_getInstalledLanguages())) {
$this->userLang = $lang;
}else {
$this->userLang = ilSession::get("lang");
}
}
}

Expand Down
1 change: 1 addition & 0 deletions templates/tpl.guest.html
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ <h5 class="modal-title" id="exampleModalLabel">Nutzungsbedingungen</h5>
.err_displayname_0,
.err_termsofuse_0,
.err_moderator_0,
.err_userlimit_0,
.err_displayname_1 + .err_moderator_1 {
display: none;
}
Expand Down

0 comments on commit 183e7cc

Please sign in to comment.