protected function hasLanguageCodesAsKeys(array $fields)
    {
        $languageCodes = $this->getContentLanguageCodes();

        foreach ($fields as $fieldIdentifier => $fieldData) {
            if (!is_array($fieldData) || empty($fieldData)) {
                return false;
            }

            foreach ($fieldData as $key => $data) {
                if (!in_array($key, $languageCodes, true)) {
                    return false;
                }
            }
        }

        return true;
    }