Download & Extend

How to set multilingual menu item

Project:Localizer
Version:5.x-1.x-dev
Component:User interface
Category:support request
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

Previously setting multilingual menu terms is very straightforward, but now under the latest release, I am really confused, can not make it works.

I first create a menu item in English, then open edit interface, and I see 'English' Change. If I select 'Chinese' and click 'Change' button, link area became grayed. I input Chinese menu name, then save, got following error:
---------------------------------------
* user warning: Duplicate entry '9' for key 1 query: INSERT INTO localizertranslation (tid, object_name, object_key, object_field, locale, translation) VALUES ('9', 'menu_item', '198', 'title', 'zh-hans', 'Site Keywords') in /home/huayen/public_html/includes/database.mysql.inc on line 172.
* user warning: Duplicate entry '10' for key 1 query: INSERT INTO localizertranslation (tid, object_name, object_key, object_field, locale, translation) VALUES ('10', 'menu_item', '198', 'description', 'zh-hans', '') in /home/huayen/public_html/includes/database.mysql.inc on line 172.
---------------------------------------
and the menu under Chinese is still displayed in English.

I don't know whether my method is correct. Any hint about this?

Again, personally I think previous menu multilingual setting is more straightforward.

Comments

#1

Yes. I have changed the code to make a correct use of the sequences table of Drupal.
Copy the attached localizer.install file (remove the .txt extension prior) into your installation,
then call the update.php url : http://www.mydrupalsite.com/update.php
So your db will be correct synced.

AttachmentSize
localizer.install.txt 2.22 KB

#2

> Again, personally I think previous menu multilingual setting is more straightforward.
Yes, but if you had more than two languages on your website it became unmanageable,
and it wasn't dynamic enough, so a lot of code was needed to add a single new field.

The items in gray (disabled) are not translatable, because it has no sense to translate them.

#3

Status:active» fixed

Also don't forget to apply the patch for menu.module.

#4

Status:fixed» closed (fixed)
nobody click here