Skip to content
● Meet Grav Guard: keep every Grav site you run secure and up to date, all from one place. Free for up to 3 sites. Read more →

Multilanguage concat strings in frontmatter

form

Solved by Karmalakas View solution

Started by Karmalakas 6 years ago · 1 replies · 844 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 TomW, 2 weeks ago
8 228 9 hours ago
Support · by alex, 2 months ago
8 667 24 hours ago
Support · by Supple, 5 days ago
1 98 1 day ago
Support · by TomW, 1 week ago
3 160 3 days ago
Support · by TomW, 6 days ago
2 106 6 days ago