Page tree
Skip to end of metadata
Go to start of metadata

The I18NPropertyDefinitionAuditor is a companion to PropertyDefinitionAuditor. Instead of checking for the definition of a node property for the default language, this auditor can check that values are defined for all or some of the available languages for the site.

This auditor only checks that a property is defined, not the value of the property. Use I18NPropertyValidationAuditor to check that the values per language are valid.

Class: info.magnolia.services.seo.audit.impl.I18NPropertyDefinitionAuditor

In addition to the common auditor properties, this auditor can be configured with the following properties:

propertyName

required

Defines the node property name to be checked.

level

optional

Determines how a failed audit will be counted:

  • Error (auditErrors)
  • Warning (auditWarnings)
  • Note (auditNotes)

validateAll

optional

Controls what languages for the property will be checked. If true, the property will be checked for language variants for all languages defined for the site. If false, only the language variants defined by the expectedLanguages property will be checked.

expectedLanguages

optional

Defines a list of the languages to be checked for language variants of the property. It can be a subset of the languages defined for the site. Languages not included in will not be checked. This property will be used only if validateAll is set to false.

Example

Here is an example from the SEO module. You can find this configuration here: /modules/seo/config/auditManager/auditors/i18nWindowTitleDefined

i18nWindowTitleDefined: 
  active: true
  class: info.magnolia.services.seo.audit.impl.I18NPropertyDefinitionAuditor
  description: Check for I18N window title (pre-prod)
  propertyName: title
  • No labels