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
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | menuhiding.patch | 1.34 KB | bforchhammer |
Comments
Comment #1
bforchhammer commentedHm, 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.. :)
Comment #2
sunHm. Unfortunately, that's the wrong place for this hack. You are translating the menu twice this way. See
includes/menu.incinside of translatable's module directory. A patch may hit the repo if the code and coding-style looks acceptable.Comment #3
sunComment #4
bforchhammer commentedHm, 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 ;-)
Comment #5
sunThanks for reporting back. Marking as won't fix, because 5.x won't get new features.