问题
I am using Joomla 2.5 with the Language-Switcher Module and Plugin to built an multilingual site.
The main problem is: switching the language always leads to the translated homepage, but not to the translated menu-item., so I ran into the problem to find all translations of an Menu item.
Based on the internal Structure, the Language-filter only filters the page items with suitable language settings. So each menu item, or link, or url is unique and it is not possible to define something like a 'root' menu item for every translated menu item. Is it possible to create a Plugin that inserts a new button in the menu-item-creation-form?
Greeting philipp
回答1:
Got it Working! Searching for "translations" did not lead to proper results, instead searching for "associations" solved it. I found the answer while looking into code of the com_menus files where is written:
$associations = MenusHelper::getAssociations( $active->id );
That's all, I just needed to register the MenusHelper class via:
JLoader::register('MenusHelper', JPATH_ADMINISTRATOR . '/components/com_menus/helpers/menus.php');
来源:https://stackoverflow.com/questions/11948218/joomla-find-all-translations-of-a-menu-item