Cant setup multilang site

Hello fox
I’m all new to Grav, I realy like it.
But I’m facing an issu for the 10 past hours, I tryed to solved it using AI, but I hope regular old brain might help me better

My problem is about multilanguage FR | EN
Website is monacophotographer.com
I have been changing all the setting I could in sytem.yalm
I have created pages in both language, in the admin pannel I can see both language and select each language
in the folders I have tried mayny combinaison (only 2 at the same time)
default.md
default.en.md
default.fr.md

when I’m in a page in the menu, I can’t swop to the same page in the other language it keep on going back to the home in the default language
I have tried degeug with
PAGE LANGS: {{ page.languages|json_encode(constant(‘JSON_PRETTY_PRINT’)) }}
but I always get PAGE LANGS: null
it looks like both pages are not married together, but in the admin> page they are together.

I have put the change language menu ,
But it keeps putting the active URL in the other language menu

    {% for lang in config.system.languages.supported %}
  • {% if lang == grav.language.getActive %} {{ lang|upper }} {% else %} {# TENTATIVE 1 : La méthode propre (Traductions liées) #} {% set target = page.translations\[lang\] %}
                    {# TENTATIVE 2 (Secours) : On cherche par le dossier physique #}
                    {# On reconstruit l'URL manuellement si Grav est perdu #}
                    {% if not target %}
                         {# On suppose que la page FR a le slug du dossier ou son propre slug #}
                         {# C'est une astuce : on force le switch de langue sur l'URL courante #}
                         {# ATTENTION : Cela marchera uniquement si le slug est identique ou si on redirige vers la racine du dossier #}
                    {% endif %}
    
                    {% if target %}
                        <a href="{{ target.url }}">{{ lang|upper }}</a>
                    {% else %}
                        {# DERNIER RECOURS : On renvoie vers l'accueil de la langue pour ne pas faire de lien mort #}
                        <a href="{{ base_url_simple }}/{{ lang }}">{{ lang|upper }}</a>
                    {% endif %}
                {% endif %}
            </li>
            {% if not loop.last %}<li>|</li>{% endif %}
        {% endfor %}
    </ul>
    

    If any are used to multi language I hope you will be able to help
    All the best
    Lawrence

@Lawrence, please help the community help you and read The art of asking great questions

In short:

  • show us you read the docs (e.g. Multi-Language | Grav Documentation).
  • what are you trying to achieve
  • provide proper information/facts like relevant configuration snippets
  • show list of extra installed plugins
  • versions of Grav and OS
  • properly format snippets of yaml, twig, php
  • explain shortly the purpose and expected outcome of a twig/php snippets instead of making us trying to understand the code.
  • are there any Grav errors?
  • are there any errors in the browser’s devtools/console?

Asking the community for help starts with investing time in the question… That will hugely increase the probability someone will respond and an answer can be found.