[drupal-support] international menus?

Bèr Kessels berdrupal at tiscali.be
Mon Jun 20 12:08:06 UTC 2005


It might, but then again: it might just as well not. Drupal is complex. 
Caching, variables, flexibility, theme layers and all make these things not 
so straight forward. 
A hack like you suggest could work, but is absolutely not an option for drupal 
Core. 

ber

Op maandag 20 juni 2005 12:12, schreef D_C:
> 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
Regards,
 Bèr
-- 
 [ Bèr Kessels | Drupal services www.webschuur.com ]



More information about the drupal-support mailing list