[support] Multilingual site and menu

Wouter Verhelst w at uter.be
Mon Apr 30 11:53:14 UTC 2007


Hi,

For the last two days, I've been trying to set up a site using drupal so
that its contents is available in multiple languages. Translating nodes
using the i18n module is, luckily, not that hard at all. But translating
the menu is a different matter altogether.

The i18n module comes with a file i18nmenu.module which translates the
menu title properly. That works, but the only problem with that approach
is that it does not translate whatever the menu item links to. As a
result, I get horrible results such as the menu item linking to the
Dutch node when the user is browsing the English version of the site...
not very good.

I've been trying to hack around this in various ways, but none of the
solutions I've come up with is satisfactory.

First, I tried creating one of those multilingual blocks that the i18n
module provides. This works for the menu in the left or right column,
but not for the 'primary links' system. So scratch that.

Then, I tried creating URL aliases which would resolve to the right
item, so that drupal would pick out the right node by itself.

My first attempt involved creating something like 'taxonomy/term/1'; but
that gave me teasers only, which wasn't appropriate. Besites, it had to
link to a node rather than a list. So scratch that.

I tried creating an alias to something like 'node/or/2,10', hoping that
this would be a valid syntax. It turned out not to be.

I tried creating a custom_url_rewrite function to return a different
rewriting scheme based on 'global $locale'. That doesn't seem to work,
since it breaks the URL rewriting stuff of the i18n module (which comes
with its own custom_url_rewrite function). Every time I access a URL
alias.

I tried creating aliases through the browser interface of the form
'nl/about' and 'en/about', then linking to 'about' in the menu system.
That works, but then the site doesn't grasp that 'en/about' is the same
thing as 'about'.

I'm out of ideas now. Any hints would be greatly appreciated.

Apart from that, I'm also looking for a module which would allow me to
control access to forums in a more fine-grained manner; I would like to
set up a public forum ('guestbook'), a private forum, and an even more
private forum that's only available to people in a specific role, not
just any authenticated user. That doesn't seem possible using the
current system.

I'm using Drupal 4.7.6, if that matters.

-- 
Shaw's Principle:
	Build a system that even a fool can use, and only a fool will
	want to use it.


More information about the support mailing list