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.

Gantry

"home" item is not translated in a bilingual website

Solved by elisabetta View solution

Started by elisabetta 5 years ago · 6 replies · 706 views
5 years ago

I have a big issue with a bilingual website (gantry 5 Rockettheme theme and Grav 1.7.3) All the menus items are correctly assigned to pages and outlines, and the menu is visible in both languages without problem, except for the homepage , which is "Home" in English and "Home" in Irish, while it should be named "Baile" . Also the active link always points to the english version of the page, while it should point to the Irish version.
I've double-checked everything, cleared every possible cache (browser, gantry and GRAV) and built the site 4 times, but I can't solve the problem.
The Rocketheme experts weren't able to help me... what else can I do?

This is the link

5 years ago

@maria,

what else can I do?

You could provide the following info:

  • What does the 'languages' section in 'system.yaml' look like?
  • What is the frontmatter in '01.home/default.en.md' and '01.home/default.ga.md'?
  • Are you using plugin 'LangSwitcher'?
last edited 01/29/21 by pamtbaau
5 years ago

Hi pamtbaau, thanks for your reply. So

1) system.yaml langauages section

TXT
      languages:
      supported:
        - en
        - ga
      default_lang: null
      include_default_lang: true
      include_default_lang_file_extension: true
      translations: true
      translations_fallback: true
      session_store_active: false
      http_accept_language: false
      override_locale: false
      content_fallback: {  }
      pages_fallback_only: false

2) default.en.md file:

YAML
    title: Home
    cache_enable: false
    process:
        markdown: true
        twig: true

{% include "forms/form.html.twig" with {form: forms( {route: '/form/contact'} )} %}

3) default:ga.md file:

YAML
    title: Baile
    cache_enable: false
    process:
        markdown: true
        twig: true

{% include "forms/form.html.twig" with {form: forms( {route: '/form/contact'} )} %}

4) LangSwitcher plugin enabled and working correctly for all the other menu items ("The Hooker", "News", "Resources", "Contacts")

Let me know if there is any other info I can provide

last edited 01/29/21 by elisabetta
5 years ago

What happens if you set the default language in system.yaml (default_lang: en for eg.)? How does your menu template look like? Seems like Home element is separate from the rest.

5 years ago

@maria, Had a look at your site, pulled the covers... and it appears to be Gantry using a paid theme called Zenith. Which means I cannot download the theme, test it, look at its code, ...

I'm afraid, I can't help you with this one...

last edited 01/30/21 by pamtbaau
5 years ago

@pamtbaau I understand ...thanks anyway!
@Karmalakas I tried to set it to en, but there isn't any diffference

last edited 01/30/21 by elisabetta
5 years ago Solution

For anyone with the same problem: I found a workaround here

👍 1

Suggested topics

Topic Participants Replies Views Activity
Gantry · by Chris, 11 months ago
1 176 11 months ago
Gantry · by Sam, 1 year ago
7 221 1 year ago
Gantry · by Dima, 2 years ago
2 75 2 years ago
Gantry · by KimTaeWoong, 9 years ago
2 1885 3 years ago
Gantry · by stani, 6 years ago
2 832 3 years ago