untranslated_content_message
Natively, Drupal language module offers a language switcher that links to the translation of the page, whether it exists or not. Nothing wrong for SEO if canonical url tag and hreflang link tag is not telling lies, but it may hurt usability.
This module adds a block that will warn the user about untranslated content is shown if there's none for current language.
This module is a way to keep the Drupal core language switcher block, without having to use some (great) modules that change the logic of switcher (hiding the unavailable languages link if there's no translation or leading to front page). These logics may work for your use case, but it may seem that the language is not available anywhere in the whole site when it is just for a specific content.
Features
A simple block, no configuration, will be shown when content is not available in the selected language.
Post-Installation
Add the block in block layout settings. You may enable only for those content types you need in block conditions.
You may preprocess to suit to your needs.
Similar projects or workarounds
With different workarounds as stated in https://www.drupal.org/project/drupal/issues/2861280#comment-15016674
- https://www.drupal.org/project/content_translation_redirect
- https://www.drupal.org/project/dropdown_language
- https://www.drupal.org/project/language_switcher_extended
- https://www.drupal.org/project/lang_dropdown
- https://www.julienverneaut.com/en/articles/extended-options-language-sel...
- https://menetray.com/en/blog/how-customize-language-selector-drupal