When a menu item's language is set to neutral and menu translation settings is set to "Translate and Localize. Menu items with language will allow translations. Menu items without language will be localized" menu items are translatable through both /admin/structure/menu and Drupal string translation interface.
This works but only for UI, if user visits for example "structure/menu/manage/main-menu" , menu items title appear always untranslated.

Comments

co.kazemi’s picture

StatusFileSize
new833 bytes

Hi I found the problem was because of the text group field in the translation table. When we add translations for a menu item, it saves row with "menu" for the text group field. So it shows rightly translated item in menu place. But for admin overview Drupal use default (built in interface). I use a _i18n_menu_link_title function to solve it. Apply patch to i18n_menu. module to test this patch.

sinasalek’s picture

The format of the patch is incorrect, also the patch has a side effect
Menu items that are added using for example views that before applying the patch were appearing translated , appear untranslated.
For reproducing it try adding items to menu using views menu settings and then translate it using i18nviews

co.kazemi’s picture

StatusFileSize
new1.04 KB

Everything goes right. Check it again, please.

sinasalek’s picture

sinasalek’s picture

Status: Active » Needs review

The approach generally seems correct, however there is sort of a logical problem here. title_callback for menu items that are link to specific pages within site almost always is not empty. However if we skip checking title_callback and always try to translate the title, what will happen to title_callback? It think that it's not important because title_callback is for the page title i guess and not the menu name.

In our case in recent version of the Drupal and our particular use case that patch #1 seems to be working fine. It would be great if someone with more knowledge about i18n review that patch.

sinasalek’s picture

Title: Untranslated menu items in admin/structure/menu » menu admin overview page is not translated admin/structure/menu
StatusFileSize
new2.13 KB

Status: Needs review » Needs work

The last submitted patch, 6: untranslated_menu_overview_page-2345843.patch, failed testing.

sinasalek’s picture

Status: Needs work » Needs review
StatusFileSize
new2.05 KB

Patch reroll and still works

Status: Needs review » Needs work

The last submitted patch, 8: untranslated_menu_overview_page.patch, failed testing.

sinasalek’s picture

StatusFileSize
new2.03 KB
sinasalek’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 10: untranslated_menu_overview_page.patch, failed testing.

sinasalek’s picture

StatusFileSize
new2.01 KB
sinasalek’s picture

Status: Needs work » Needs review
joseph.olstad’s picture

seems like a reasonable patch, maybe put it in dev after pending release

joseph.olstad’s picture

Status: Needs review » Fixed

fixed in dev branch, let this simmer in dev for a while.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.