Skip to content
Grav 2.0 is officially stable. Read the announcement →
Archive

Translate Form Plugin validation

Started by Muut Archive 10 years ago · 4 replies · 640 views
10 years ago

I need to translate the form plugin validation messages. How can this be done? Right now they look like this:
Validation failed: Invalid input in "Email"

10 years ago

I figured out how to change to second part by doing the following:

YAML
validate:
     required: true
     message: 'Bitte überprüfen Sie Ihre Eingaben' 

But I have no Idea how to translate the first part saying Validation failed:
Can somebody help me out on this?

10 years ago

Had to add german (de) as only supported language to system.yaml to get the output in german. thanks.
but another question: if I'd like to change that text…
I had a look in the form template and found the following {{ "FORM.VALIDATION_FAIL"|t|raw }}. To translate/change this I tried

YAML
FORM:
  VALIDATION_FAIL: '<b>Test:</b>' 

inside my languages de.yaml but it didn't work. Whats wrong with it? Any clue?

10 years ago

Ah nevermind. I'm really sorry for the inconvenience. I edited the wrong file >.<
Works like a charm! Thanks!

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1359 9 years ago
Archive · by Muut Archive, 9 years ago
2 936 9 years ago
Archive · by Muut Archive, 9 years ago
2 4066 9 years ago
Archive · by Muut Archive, 9 years ago
1 2955 9 years ago
Archive · by Muut Archive, 9 years ago
3 1121 9 years ago