public function createNameByFields(string $language, array $data)
    {
        if ($language) {
            /** @var System $system */
            $system = $this->framework->getAdapter(System::class);

            $system->loadLanguageFile('default', $language, true);
        }

        $name = '';

        if ($data['firstname']) {
            $name = $data['firstname'].($data['lastname'] ? ' '.$data['lastname'] : '');
        } elseif ($data['lastname']) {
            $name = $data['lastname'];
        }

        if ($name && $data['academicTitle']) {
            $name = $data['academicTitle'].' '.$name;
        }

        if ($name && $data['additionalTitle']) {
            $name = $data['additionalTitle'].' '.$name;
        }

        if ($data['lastname'] && $data['gender'] && ('en' != $language || !$data['academicTitle'])) {
            $gender = $GLOBALS['TL_LANG']['MSC']['haste_plus']['gender'.('female' == $data['gender'] ? 'Female' : 'Male')];

            $name = $gender.' '.$name;
        }

        if ($language) {
            $system->loadLanguageFile('default', $GLOBALS['TL_LANGUAGE'], true);
        }

        return $name;
    }