$name) { if (!empty($default)) { $defaultValue = $default; } else { $defaultValue = api_get_setting('platformLanguage'); } if ($languages['folder'][$index] == $defaultValue) { $this->addOption($name, $languages['folder'][$index], ['selected' => 'selected']); } else { $this->addOption($name, $languages['folder'][$index]); } } } }