Is there a way to temporarily disable multilanguage selector links when a page doesn't have a translation? Currently when a basic page doesn't have a translation and you click on a different language in the multilanguage switcher it shows you the page in the same language. This causes a lot of duplicate content on the website which is bad for SEO.

How can I make sure the multilanguage switcher link to a different language shows up when the article is actually translated and disable the link when it isn't? Is there a way to configure this?
You could implement hook_preprocess_block in your theme.
Hope this helps you.

/**
 * Implements hook_preprocess_HOOK() for block.html.twig.
 */
function bartik_preprocess_block(&amp;$variables) {

  if ($variables['plugin_id'] == 'language_block:language_interface') {
    // Gets current node object from the current path.
    $node = \Drupal::routeMatch()-&gt;getParameter('node');

    // Gets all the translation languages, returns an array.
    $languages = $node-&gt;getTranslationLanguages();
    // Gets the number of languages.
    $number_of_languages = count($languages);

    if ($number_of_languages == 1) {
      // Basically, clears out the content render array.
     $variables['content'] = array();
    }
  }
}