At the moment if a translation of a node is not available, you can still choose to switch language, which does change the interface language but displays the node in the default language. This also applys to menu items, which results in ugly half translated menus - if you haven't translated every single item...

My suggestion for a better handling would be:

  • for Nodes: for the case that a translation is not available allow to display an error message, or at least a note above the content (...) notifying the user of the missing translation
  • Menu Items: allow hiding of non-translated menu items
CommentFileSizeAuthor
#1 menuhiding.patch1.34 KBbforchhammer

Comments

bforchhammer’s picture

StatusFileSize
new1.34 KB

Hm, I've quickly hacked together a patch to hide untranslated menu items... I'm not sure this is the best way to do, and it certainly needs at least a respective option on the settings page, but it seems to work.. :)

sun’s picture

Hm. Unfortunately, that's the wrong place for this hack. You are translating the menu twice this way. See includes/menu.inc inside of translatable's module directory. A patch may hit the repo if the code and coding-style looks acceptable.

sun’s picture

Title: what to if a translation is not available.. » Hide untranslated menu items
bforchhammer’s picture

Status: Active » Postponed

Hm, from looking at my patch I think all I did was "unset" the unwanted menu-items.. unless the whole menu-tree is built twice (which I though wouldn't usually be the case?) that shouldn't actually make the menu items be translated twice.. or does it?

Either way, I'm sorry, but as I'm not actually using #translatable anymore I won't be able to spend too much time on this issue.. if this functionality is still needed by someone else I'm of course willing to provide my 2p ;-)

sun’s picture

Status: Postponed » Closed (won't fix)

Thanks for reporting back. Marking as won't fix, because 5.x won't get new features.