Skip to content
● Critical PHP security fixes are out: update PHP on your Grav sites. What to do →

Enable top nav alternate language URL

first-time plugins

Started by ramenos 2 months ago · 3 replies · 403 views
2 months ago

Hi everyone,

I recently updated my personal website with the new version of Grav. I used the default cms as it does the job for me. Site does exist in FR but also in EN. My only challenge is to find a way to enable navigation to alternate language via the top nav for each page.

Ex: https://www.ramenos.net/ (fr) and https://www.ramenos.net/en (en) is the alternate version. I tried to install some plugins, but it did not work. I have the impressions it should not be something complex, but I am probably missing the big obvious thing. I use Grav v2.0.19 and Admin v2.1.0.

Thanks for your help!

2 months ago

You haven't mentioned what you've tried and read, but have you already read the docs about Multi-Language ?

last edited 09/08/26 by pamtbaau
2 months ago

I did, but I did not find the answer I needed there. I did the setup to support multi languages. I have all pages translated in both languages. Default language is EN (no language code in the URL) then I have FR pages well. My issue is on how to display the alternate language link at the top of the page (in the nav) for each page.

I installed the Language Switching plugin as well, but I was not able to make it work.

last edited 09/09/26 by ramenos
2 months ago

Please include what you have read and what you have tried, so we can see what you have done and isn't working for you. Also please share what your desired outcome would look like.

  • Did you read section Usage in the README of the LangSwitcher plugin?
  • Have you tried to add {% include 'partials/langswitcher.html.twig' %} to a proper Twig file?
    • Which one?
    • Please share code snippet
    • Please share screenshot of relevant part of page.
👍 1

Suggested topics

Topic Participants Replies Views Activity
Support · by webmasterodp, 2 weeks ago
4 241 2 weeks ago
Support · by nwhitfield, 2 weeks ago
2 210 2 weeks ago
Support · by stell, 4 weeks ago
5 455 3 weeks ago
Support · by gravinator, 2 months ago
5 634 3 weeks ago
Support · by Gravver, 1 month ago
6 428 4 weeks ago