MissingTranslationError example

        $usedLocales = array_keys(array_merge($this->getDescription()$this->getPrivacyPolicyExtensions()));

        // label is required in app_translation and must therefore be available in all languages         $diff = array_diff($usedLocalesarray_keys($this->getLabel()));

        if (empty($diff)) {
            return null;
        }

        $missingTranslations['label'] = $diff;

        return new MissingTranslationError(self::class$missingTranslations);
    }

    /** * @return array<string, string> */
    public function getLabel(): array
    {
        return $this->label;
    }

    /** * @return array<string, string> */
Home | Imprint | This part of the site doesn't use cookies.