RETROTEC-AG/OpenXE#17 Locale des GUI-Users ermitteln

This commit is contained in:
Roland Rusch 2023-08-11 16:07:31 +02:00
parent dc58045423
commit bd0392698d
2 changed files with 12 additions and 1 deletions

View File

@ -97,7 +97,11 @@
<td>{|Sprache|}:</td>
<td><select name="sprachebevorzugen" id="sprachebevorzugen">[SPRACHEBEVORZUGEN]</select></td>
</tr>
<tr>
<tr>
<td>{|Sprache und Region|}:</td>
<td><input type="text" name="locale" id="locale" value="[LOCALE]" size="40" disabled="disabled"></td>
</tr>
<tr>
<td>{|Eigene Kalenderfarbe|}:</td>
<td><input type="text" name="defaultcolor" id="defaultcolor" value="[DEFAULTCOLOR]" size="80"></td>
<td></td>

View File

@ -1711,6 +1711,13 @@ $this->app->Tpl->Add('TODOFORUSER',"<tr><td width=\"90%\">".$tmp[$i]['aufgabe'].
$this->app->Tpl->Set('STARTSEITE', $settings['startseite']);
$this->app->Tpl->Set('DEFAULTCOLOR', $settings['defaultcolor']);
$this->app->Tpl->Set('SPRACHEBEVORZUGEN', $this->languageSelectOptions($settings['sprachebevorzugen']));
/** @var \Xentral\Components\I18n\Localization $localization */
if($localization=$this->app->Container->get('Localization')) {
$this->app->Tpl->Set('LOCALE', $localization->getLocale());
} else {
$this->app->Tpl->Set('LOCALE', 'Fehler!');
}
if($settings['chat_popup']){
$this->app->Tpl->Set('CHAT_POPUP', ' checked="checked" ');