Skip to content
Grav 2.1 is out: every page speaks Markdown. Read the announcement →

Multilingual site.yaml

Started by Muut Archive 11 years ago · 2 replies · 459 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 2289 9 years ago
Archive · by Muut Archive, 9 years ago
2 1503 9 years ago
Archive · by Muut Archive, 9 years ago
2 4754 9 years ago
Archive · by Muut Archive, 9 years ago
1 3570 9 years ago
Archive · by Muut Archive, 9 years ago
3 1627 9 years ago