I'm developing a site for 3 languages. Some of the pages are only available in 1 language, some are translated for more (e.g. 2 or all 3 languages).
I can generate a sub-menu that hard-codes 3 menu items for the foreseen languages. But it feels not user friendly if such switch-language-menu presents all 3 language menu items while the page exists only in 1 or 2 languages.
How to generate the switch language menu that only presents the languages choices that have a corresponding translation for the current page?
So if the current page exists as default.en.md and default.fr.md, how to build a sub menu that contains links to switch to language en or fr.
Thanks