How can I have the language-specific 'enabled' Boolean of menu items being respected? I'm trying to translate the 'enabled' field of menu items in Drupal 8. So far I have written this code in MYMODULE.module file:

function MYMODULE_entity_base_field_info_alter(&amp;$fields, \Drupal\Core\Entity\EntityTypeInterface $entity_type) {
  if ($entity_type-&gt;id() == 'menu_link_content' &amp;&amp; !empty($fields['enabled'])) {
    $fields['enabled']-&gt;setTranslatable(TRUE);
  }
  return $fields;
} 


This works fine and I am able to set the enabled field differently for different languages. eg: for the same menu item, I can check the 'enabled' field for English, but uncheck the 'enabled' field for French.

But it does not work as expected. It hides the menu item for all languages. Should I use hook_preprocess() or hook_preprocess_menu() or some other hook for the menu item to show/hide based on 'enabled' field in different languages? Can someone give me some hints on this?
For what you are trying to achieve I found out you can use the Menu Manipulator module. This module initially aimed to fix [Issue] Untranslated menu items are displayed in menus.


  Notes
  
  This module initially aims to fix this core issue with unstranslated menu items.




Having this module installed only menu items that are available in the current language will be displayed. If there's a menu item you don't need in a certain language, remove it or remove its translation.

To make this work properly, ensure that your menu, the menu title and "Show language selector on create and edit pages" is enabled for your menu under https://example.com/admin/config/regional/content-language.


Having a menu item you want only to be shown on the French site, select French as its language, and don't translate it.
Having a menu item to be shown only on the English site, select English as its language, and don't translate it.
Having a menu item to be shown on both sites, add it in one language and simply translate it.