public function attributes(): array
    {
        $languages = TransHelper::getAllLanguages();
        $translatedAttributes = ['name', 'slug'];

        $placeholder = 'for language ":lang"';

        if ($languages->count() == 1) {
            $language = $languages->first();

            return [
                "translations.{$language->iso_code}.name" => '',
                "translations.{$language->iso_code}.slug" => '',
            ];
        }

        $attributes = [];

        foreach ($translatedAttributes as $translatedAttribute) {
            foreach ($languages as $language) {
                $replaced = str_replace(':lang', $language->title_localized, $placeholder);
                $attributes["translations.{$language->iso_code}.{$translatedAttribute}"] = $replaced;
            }
        }

        return $attributes;
    }