How to hide not translated menu items I have a multilanguage site. Now i'm running in the issue that some pages don't have translations. So i would like to hide that from the navigation.

I already tried to manipulate it with that hook:

mytheme_preprocess_menu_local_task

But it seems that it does not have an affect. I also don't find any other hook which i could use for that.

Any suggestion?
Use hook_node_access() to deny access to the not translated nodes and this will automatically hide the corresponding menu items:

mymodule.module:

use Drupal\Core\Access\AccessResult;
use Drupal\node\NodeInterface;
use Drupal\Core\Session\AccountInterface;

  /**
   * Implements hook_node_access().
   */
  function mymodule_node_access(NodeInterface $node, $op, AccountInterface $account) {
    $langcode = \Drupal::languageManager()-&gt;getCurrentLanguage()-&gt;getId();
    if (!$node-&gt;hasTranslation($langcode)) {
      $access = AccessResult::forbidden();
    }
    else {
      $access = AccessResult::neutral();
    }
    $access-&gt;addCacheableDependency($node);
    return $access;
  }


You can be more specific, hide not translated nodes of specific content types. Or for specific user roles, which you probably need to do if other users than the admin wants to edit the nodes. Or you have to be specific about the operation $op. And test this with different user roles, as admin you won't see a difference, because this account passes all access checks.