[drupal-support] international menus?

Ron Mahon ron at inmrc.com
Mon Jun 20 15:24:54 UTC 2005


Ber
I was thinking about this and playing around if you add a letter to the
node id 1240-e
And use a error routine to catch and redirect it to 1240 English using the
same logic as in URL Allis you could have a simple solution.

If might also help with the doc teams problem of providing a different text
depending on who's login.

Regards
Ron 


InterNet Marketing Resource Center
A Free Super Mart of Articles, Demos, Tutorials everything you need to
Succeed on the net.
www.inmrc.com 


-----Original Message-----
From: D_C [mailto:lister at pikkle.com] 
Sent: Monday, June 20, 2005 6:13 AM
To: drupal-support at drupal.org
Subject: Re: [drupal-support] international menus?

Bèr -

Thanks for the response.

>>hello!
>>
>>does anyone know how to make the links menus depend on the users 
>>current language settings?
>>    
>>
But to just get the "links" menus working for each language, wouldn't the
following work? 

Have the "links" menus generated by a php function something like this:

foreach ($primary_links as $link):
    print trans( $link );
}

where trans() function would
- somehow get your current language from settings (I don't know how to do
this)
- look up english/other lang translated menu text (this could be specced in
an included text file?)
- prepend a en/ or jp/ to the URL that is in the links list. eg return
"en/info" or "jp/info"

then i would just have to make sure i had named pages (URL alias) for each
of the target links.

This doesn't work transparently with drupals nodes system and relies on
manually putting in node alias' but what other drawbacks are there?
Also perhaps this could use the localization/manage strings features rather
than putting the menu texts in a text file, but i dont know where to start
hacking into that...

tx,

/dc

>>using the internationalization module, it is possible to have the 
>>actual drupal system menus (eg "admin/create content") text be 
>>localized, but for menus where I create the content, is there a way 
>>these strings can also be replaced based on language?
>>
>>eg the so called "primary links" menu (like support|downloads| etc on 
>>drupal.org )
>>
>>I guess the other option is to have two sites like:
>>
>>site/en
>>site/jp
>>
>>but that would probably mean the user would have to register twice etc?
>>    
>>
>
>This is a very (very!) complex thing to achieve with Drupal. It is near 
>to impossible without hacks, or without adding big layers of complexity.
>You should look at internationalisation. You must use its table 
>prefixing to generate two tables/ one for each menu. It works this way 
>(www.dalsemmushroom.nl), but is complex to maintain.
>
>The other method would be to instal two drupal sites, with some shared 
>database tables (the handbook explains how to do this). but in this 
>case, you will loose all correlation between articles (the jp and the 
>en version of an article/menuitem/category/etc are unaware of 
>eachother)
>
>All in all I would say that it is doable, but personally I gave up on 
>this, and simply say to my clients tha at this moment its not possible 
>to do multilingual sites with Drupal. For that /is/ the truth: it is 
>all so alpha, and so buggy, that it is fair to call it "not yet working".
>
> say this with all respect to Jose A Reyero, who did a fabulous job on 
>internationalization. but as it stands, Drupal core is just not ready 
>for a multilingual approach.
>
>
>Regards,
> Bèr
>  
>







More information about the drupal-support mailing list