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

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Support

Multilanguage concat strings in frontmatter

form

Solved by Karmalakas View solution

Started by Karmalakas 5 years ago · 1 replies · 531 views
5 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?

5 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 Thomas, 1 week ago
2 64 18 hours ago
Support · by Anna, 3 days ago
2 68 21 hours ago
Support · by Justin Young, 22 hours ago
1 35 21 hours ago
Support · by Duc , 1 week ago
2 71 6 days ago
Support · by Colin Hume, 1 week ago
2 63 6 days ago