hello!
does anyone know how to make the links menus depend on the users current language settings?
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?
thanks!
Op maandag 20 juni 2005 09:18, schreef D_C:
hello!
does anyone know how to make the links menus depend on the users current language settings?
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
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
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
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@pikkle.com] Sent: Monday, June 20, 2005 6:13 AM To: drupal-support@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
Op maandag 20 juni 2005 17:27, schreef Ron Mahon:
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.
url aliases work only so far. They will not work well for menus, nor for other places. And they will break when you add (by accident, or trough code)your own aliases.
Really, there are a lot of solutions, All I want to say, is that it is extremely hard to do with Drupal. I suggest you install internationalization and add your code/patches to that project, rather then trying to re-invent a wheel.
Regards, Bèr
There is a way to share some database tables. So both sites could use the same user tables 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@pikkle.com] Sent: Monday, June 20, 2005 3:19 AM To: drupal-support@drupal.org Subject: [drupal-support] international menus?
hello!
does anyone know how to make the links menus depend on the users current language settings?
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?
thanks!