System Messages

Last updated on June 26, 2024.

This document describes internationalising form errors, authorisation policies, and other system messages.

Form validation messages

You can provide messages that the system will apply to different validation errors in other languages. Special variables are available inside the translation keys to make your messages look complete.

Always available:

  • record: resource name, e.g.
  • attribute: attribute name, e.g.
  • value: the value of an attribute provided by the user which failed validation, e.g.

Contextual

  • count: available in cases with a numeric limit/range, for example, 180 characters passed in a field with a character limit of 140.

The default error messages are:

To override these messages, create your file in the folder or your module directory.

You can override only one message.

app/translations/en.yml

Authorisation policies

You can also use translations to internationalise the property in authorisation policies.

app/authorization_policies/always_fail.liquid

app/views/pages/unauthorized.liquid

app/translations/en.yml

app/translations/pl.yml

Have a suggestion for this page?

Didn't quite find what you are looking for or have feedback on how we can make the content better then we would love to hear from you. Please provide us feedback and we will get back to you shortly.