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

Multilingual site.yaml

Started by Muut Archive 11 years ago · 2 replies · 479 views
11 years ago

Any ideas how to do that? Something like:

--- yaml
title:
en: English title
fr: French title

TXT


?
11 years ago

Per the multi-language docs the better option is to put your translations into the user/languages/en.yaml and user/languages/fr.yaml:

TXT
SITE_TITLE: English Title

then you can simply use the translate filter |t in Twig:

TWIG
<title>{{ 'SITE_TITLE'|t }}</title>

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 2609 9 years ago
Archive · by Muut Archive, 9 years ago
2 1716 9 years ago
Archive · by Muut Archive, 9 years ago
2 5011 9 years ago
Archive · by Muut Archive, 9 years ago
1 3840 9 years ago
Archive · by Muut Archive, 9 years ago
3 1820 9 years ago