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

Multilingual site.yaml

Started by Muut Archive 10 years ago · 2 replies · 382 views
10 years ago

Any ideas how to do that? Something like:

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

TXT


?
10 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 1357 9 years ago
Archive · by Muut Archive, 9 years ago
2 936 9 years ago
Archive · by Muut Archive, 9 years ago
2 4066 9 years ago
Archive · by Muut Archive, 9 years ago
1 2954 9 years ago
Archive · by Muut Archive, 9 years ago
3 1120 9 years ago