Closed yankl closed 2 years ago
Do I understand this correctly?
Precondition: untranslated_pages_behavior
is set to hide
On the website, in the Langswitcher section (e.g. frontend: EN FR IT), the default language (e.g. EN) is not shown in the selection under 'certain conditions'?
As far as I know, the default language entry, e.g. EN, disappears from the Langswitcher section on the frontend upon clicking on a secondary language. Hence, only FR IT is shown, EN is no longer there. At least this is the issue I have stumble upon.
Workaround: If you name the default.md
--> default.en.md
, EN will be back in the selection on the frontend.
If that is what you are talking about, then I can confirm this issue, stumbled over it two days ago. Grav 1.7.35, LangSwitcher 2.0.1
Yes, that's what I mean, the language code extension not appearing in the .md file name, and untranslated_pages_behavior
set to hide
causes the link to the default language to not appear on the secondary language pages.
Please try the latest version of the 'develop' branch. I've rewritten this logic.
I have tested it and can confirm that this issue is fixed in the current develop branch.
Yes, this issue is resolved for me! However, there seems to be a new regression, unfortunately. See my comment here.
My experience is that the default language doesn't appear on translated pages when
untranslated_pages_behavior
is set tohide
in the plugin configuration, and the .md file for the default language doesn't include a language extension -- as is the case if, for example, the page was created wheninclude_default_lang_file_extension
is set tofalse
in the site config.A detailed analysis and proposed fix is in the PR below.