Skip to content
● Grav 2.2 is out: 2x faster cold starts and 96% less memory on big sites. Read the announcement →

Multilanguage concat strings in frontmatter

form

Solved by Karmalakas View solution

Started by Karmalakas 6 years ago · 1 replies · 724 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 webmasterodp, 4 days ago
4 110 3 days ago
Support · by nwhitfield, 5 days ago
2 97 5 days ago
Support · by stell, 2 weeks ago
5 339 1 week ago
Support · by gravinator, 1 month ago
5 538 1 week ago
Support · by Gravver, 3 weeks ago
6 333 3 weeks ago