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 · 648 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 cvgrenoble, 16 hours ago
3 43 11 hours ago
Support · by Paul Hodges, 1 month ago
19 512 1 week ago
Support · by Lauw, 1 week ago
2 121 1 week ago
Support · by Anna, 3 weeks ago
4 437 2 weeks ago
Support · by gtx, 4 weeks ago
4 390 3 weeks ago