- Status changed to Needs review
almost 2 years ago 2:12pm 29 July 2023 - Status changed to Needs work
3 months ago 11:33pm 19 February 2025 - Status changed to Closed: won't fix
8 days ago 12:02pm 15 May 2025 - π§πͺBelgium lobsterr
I think, this is not a problem of superfish module, but menu_token module.
Menu token module overrides MenuLinkTree class to build the menu tree and replace token.
So, when MenuLinkTreeMenuToken class builds menu tree:
it gets the title like this:$element['title'] = $link->getTitle();
but in this case we get title from MenuLinkContent class:
/** * {@inheritdoc} */ public function getTitle() { // We only need to get the title from the actual entity if it may be a // translation based on the current language context. This can only happen // if the site is configured to be multilingual. if ($this->languageManager->isMultilingual()) { return $this->getEntity()->getTitle(); } return $this->pluginDefinition['title']; }
As you can see if the content is multilingual, then we take title from the entity and not from plugin definition.
Menu token modules replaces tokens only in the plugin definitions.To conclude it should be correctly handled on Menu toke side then we will get the right value for a title.
I have just found this!
You can use solution from this ticket: π Title replacement not working on multi-language site. RTBC