I am working on a multilingual site (http://elisto.org/memo). I have modules i18n, i18blocks and i18nmenu installed on Drupal 4.6.5. When I create a new menu item, I have to select a node to which this item will direct (say node 21). However, when I translate a node (for example on my site the menu item Homoj/People/Individus), a new node is created for the new languages (say node 79 and 80), so that the menu item points always to the same page (node 21) whatever the language chosen. I can switch to the correct node if I click on the flags, but I wouldn't want the users to have to click on flags everytime they look at a new page. Did I do something wrong? At some point I unsucessfully tried to get clean URLs and the system seemed to have been messed up because of that, otherwise I can't see what I have been doing wrong... any hints? Anyone with the same problem? Anyone got a solution?

Thanks a lot in advance.
Boris

Comments

gjost’s picture

Hi boriso, i had a similar problem, and was told to try applying the i18n patch that comes with the module. It should insert the proper language code.

If you need help installing the patch, you can start by looking here.

boriso’s picture

Thanks a lot gjost. Unfortunately but it didn't work for me. If I understand correctly, even if the language code is added to the URL, the situation won't be solved as the new URL should refer to another node altogether. I think there must something with the i18n_node table, since that has the information about the translation IDs and corresponding node IDs for the various translations (for example in my case, trid 8 corresponded to the node IDs 21, 79 and 80). However in the i18n node table there is no information about which language corresponds to which node. That how far I can get. Hope someone can help... or tell whether the problem will be fixed in the next Drupal version.

thanks in advance.
/boris

boriso’s picture

Ok, I fixed it via php. I created my own block, in which I inserted php code: For example:

$lang = i18n_get_lang();
if ($lang == 'fr')
{echo "Inscrivez-vous à la lettre d'information";}
if ($lang == 'en-US')
{echo "Subscribe to our newsletter";}
if ($lang == 'eo')
{echo "Aliĝu nian informleteron";}

?>