While logged in as user/1 I am receiving and access denied notice when trying to translate a menu link located at for example /admin/structure/menu/item/14/translate ... I have test all available menus and the same issue always occurs. What can be the problem that i can check? many thanks Kevin

CommentFileSizeAuthor
#7 ml.png47.83 KBsubhojit sinha

Comments

jmart’s picture

What worked for me is to click "edit" on the menu item and hit "save". Now I can translate the item.

To make this automatic, I created a module, which has the added benefit of being able to translate the menu item within the node (if you have that setting enabled).

Here is the code below:

function epc_menu_insert_menu_link_insert($link){
    $link2 = menu_link_load($link['mlid']);
    $link2['customized'] = 1;
    menu_link_save($link2);
}
pyxio’s picture

Status: Active » Closed (fixed)

I solved this. Apparently, the menu itself needs to be translated first before it is possible to translate a menu item link.

FatalMojo’s picture

Version: 7.x-1.x-dev » 7.x-1.0-beta4
Status: Closed (fixed) » Active

Tried both workarounds in #1 and #2 with no success. Still getting access denied when trying to translate menu items.

FatalMojo’s picture

Status: Active » Closed (works as designed)

I figured out my issue. Menu items were added by default as "Language neutral". Changing them to english allowed me to add translations for other languages. I think that's standard.

drupa11y’s picture

Maybe also a reason is that a refresh is needed: /admin/config/regional/translate/i18n_string

tenamurphy’s picture

This solution worked for me: https://www.drupal.org/node/2119779#comment-7999741
It was in D7 admin/structure/menu/manage/mymenu/edit. In this page, you have the multilingual options. You need to tick "Translate and Localize...."

subhojit sinha’s picture

StatusFileSize
new47.83 KB

ml menu setting
Changing this setting in "yoursite/admin/structure/menu/manage/your-menu/edit" will do the trick