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

Multilanguage concat strings in frontmatter

form

Solved by Karmalakas View solution

Started by Karmalakas 6 years ago · 1 replies · 643 views
6 years ago

In Grav docs there's a basic example of the form config and there's this line:

TWIG
subject: "[Feedback] {{ form.value.name|e }}"

I've searched and YAML doesn't support string concatenation. Also I somehow doubt Grav has the ability to parse multilingual placeholder only in part of the strings.

Is there any way to make the Feedback word multilingual? Or maybe some workaround?

6 years ago Solution

Right after posting a question, realized I can also use Twig :)

TWIG
subject: '[{{ "CONTACT_FORM.SUBJECT"|t|e }}] {{ form.value.name|e }}'

Sometimes all it takes, is just ask :D

👍 1

Suggested topics

Topic Participants Replies Views Activity
Support · by Paul Hodges, 4 weeks ago
19 485 5 days ago
Support · by Lauw, 7 days ago
2 99 7 days ago
Support · by Anna, 3 weeks ago
4 426 1 week ago
Support · by gtx, 4 weeks ago
4 377 3 weeks ago
Support · by Anna, 1 month ago
9 484 3 weeks ago