Please be aware that the information on this page is probably out-of-date and no longer reflects a usable workaround to this common problem. This page also needs updating(deletion?) as it conflicts with the documentation Menus and primary / secondary links

Summary: When no translation exists for a page, menu items disappear, or they may be displayed in the wrong language

Quick answer: Always set new content to Language Neutral until you are ready to create a translated version. Read more details below.

Environment: You have the i18n module installed. You made multilingual menus by creating some menu items in all of your site's languages. So a menu contains menu items in several languages, but Drupal displays only the menu items that match the current interface language. (note: this is the 2nd option described on this page)

This problem occurs when you are using these multilingual system settings: Path prefix with language fallback, and Current language and language neutral. It may appear with other settings also, but I haven't checked this.

Problem: No translation exists for a page (node). You try to view that page (for example, by opening the original/source/default language version and then clicking another language in the language switcher block)

Effects seen: Menus inside blocks do not display properly (some menu items are missing). Drupal wants to display the translated versions of these menu items, but they do not exist, so it displays nothing. (Note: 'translated version' means a translated string created on the 'Translate interface' page)

If they are not displayed in blocks, Drupal's built-in menus (Primary menu and secondary menu) still show all menu items. But if no translation exists for a string then the menu items are displayed in the wrong language, even if you have created an appropriate language version of that menu item).

In addition, if you click on another menu item from this malformed page, the same interface problems will appear on the new page. This happens even when an appropriate translation exists for the new page, so it would normally be displayed without problems.

Solution: This problem appears when you have created a node (e.g. a page, story or blog post) but you have not created a translated version of it and you have set the node to any particular language. To prevent this issue: when you create new content nodes, always set untranslated pages to Language Neutral (Normally, the Language setting appears above the body text area where you are typing in the new content). Do not change the node's language setting until you are ready to add a translated version of the node.

In theory, another workaround for this issue might be to use 'Translate interface' to create translations of all menu items. However, even if this works, it is probably a bad idea as it means you will have two copies of every menu item's name, so you need to manually keep these synchronized in future.

Comments

Bartezz’s picture

________________
Live fast die young

jsartin’s picture

Bartezz’s picture

:) You are linking to a duplicate of the issue I'm linking to...

________________
Live fast die young

jsartin’s picture

Didn't notice that, oops!

So, now that I have the menus appearing, they aren't keeping the active trail in other languages. It works in my D5 environment (not sure how though, since I didn't set it up). The main links on my D6 Take you to the proper translated page, but the active trail is not there. I am using the prefix for language selection (all my nodes are stored as node/X NOT en/node/X and es/node/x for their path...)

I have spent too much time on the translation issues from the differences in D5 to D6...

porg’s picture

I am observing multilingual Drupal sites such as www.koumbit.org, www.e2s.be, etc, and I ask myself how they got to work their menus multilingually?

In my research I stumbled across: Tutorial - Building a multi-language site, which basically says:

For translated menus you have 2 options:
1) Build a menu for every available language.
2) Build one menu with links that point to every available language. What I mean is that if node/1 is your home page in English and node/2 in Greek, in your menu you have to make a link to node/1 named "Home Page" and one to node/2 named "Αρχική Σελίδα" (this is home page in Greek). You have to do this for every multilingual page.

Both methods seem to ask for a lot of human work. Workload itself is not promising. And additionally this process is prone to human errors, likely results in your menus not being consistent in your various target languages! Hence even more correction effort!

One may consider the asynchrony of different language menus as a feature, if one desires to have different menu structures in different languages. But in my case, I just would like to have the same menu structure, just localized to various languages, with as little effort as possible.

What I am looking for? A solution to build the menu only in the default language, and then localize all the labels, where the links shall then also point to the correct localized nodes!

What I already tried: I used the translation interface to translate menus. The English menu label "Products" then correctly showed up as "Produit" in the French display, but the problem is that "Products" points to "node/20" but the localized menu item with the label "Produit" still points to the original "node/20" and not to the localized "node/21".

How does one ensure that every localized menu-label then also points do the localized node? That's the big question for me!