Menu import can be a handy tool to quickly set up a framework for a site, and it's even more of a timesaver when setting up a multilingual site. Currently I just import the same menu in several languages, and as a result I get the core of the same site in each language.
What it doesn't support, is somehow link the nodes it generates for each menu, across languages. I think that would be very nice, but I have barely a clue on how that should work.
I think that what technically should be done, is enter the same value for "tnid" in the node. That tnid can be (should be?) the node id for that node for the first language you import (and it might be wise to select the default language, for that).
But the value of tnid is unknown until the first time you actually import the menu. I don't think it's reasonable to expect the user to edit that text file and store the tnid in that line, for example in the link for that line. Yes, "node/123" could actually imply "a new node with tnid=123 for the current language", if that node already exists but is in a different language. But making node ids up on the spot, that doesn't quite appeal to me, and editing the text file after the first import, neither.
And I don't think this module actually logs any of its actions, otherwise we could look it up in the next run.
Perhaps a better approach would be to allow to import a menu in more than one language at once? That way, the module could just store the last nid value in a PHP variable, and use it as tnid for the other languages.
Comments
Comment #1
lex0r commentedThe feature seems to be valuable, but I don't quite understand why do you import the same menu as many times as languages you have? Site should have one single menu, and, depending on the language selection strategy you choose, menu links are generated for each node when a page is rendered. i18n provides menu translation mechanisms, however, you might not using it and so decided to duplicate the menu. Am I right?
Comment #2
lex0r commented