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

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

General

Translate variable strings from site.yaml?

Started by 01K 7 years ago · 0 replies · 551 views
7 years ago

Hi!
I'm successfully have translated template strings with |t filter.
However, some string left untouched.
There are few left from site.yaml file:

YAML
title: Default lang title
default_lang: en
author:
  name: Default Lange Name
  email: Default email
  copyright: 'Default  copyright'

These strings are displayed with the help of {{ site.author.copyright }} from html.twig template.

My logic was to append lanuage.yaml with these variables. however this doesn't work:

YAML
non_en_lang:
  SITE:        
    TITLE: NON EN TITLE
    DESCRIPTION: NON EN DESC
    AUTHOR:
       COPYRIGHT: NON EN COPYRYGHT

Is it possible or there is another approach?
I've tried the {{ site.author.copyright|t }} but this doesn't work

Suggested topics

Topic Participants Replies Views Activity
General · by Jerry Hunt, 4 days ago
2 95 15 hours ago
General · by pamtbaau, 20 hours ago
1 61 19 hours ago
General · by Andy Miller, 1 day ago
0 47 1 day ago
General · by Marcel, 12 months ago
6 356 5 days ago
General · by Duc , 6 days ago
3 44 6 days ago