Open rgherman opened 8 years ago
I am not sue localization on menus is possible, though yes, you can add a localization part... I don't think people actually do this. Most people have different menus per local...
Actually we did this for more than 20 sites. and it worked for orchard 1.8 and below and now it doesn't.
I'm not sure I understand the last statement. Could you please elaborate? 1) I thought localization should work with any part 2) if you say we are doing it wrong, can you tell me how to do it correct?
I can confirm that menu localisation does not work for us. We had to create 2 menus and overidding menu.cshtml
The problem is in: AdminController, from OrchardLocalization module.
First of all it is not correct to pass masterContentItem in: var content = _contentManager.BuildEditor(masterContentItem);
as the Model.ContentItem.ContentItem.Id == 0 is always false in Localization.ContentTranslations.Edit.cshtml
BUT, even if I pass contentItemTranslation, the problem here is that the MenuPartDriver.cs CurrentMenuId is assigned -1: CurrentMenuId = part.Menu == null ? -1 : part.Menu.Id,
because part.Menu is null in this case.
I had to introduce a new property, in order to verify if this is a new Transaltion for the menu or not, and use that to determine what to display on the Translation ui.
This is a problem for any ContentItem not only Menu Translation.
Hope someone from contributers will fix this soon.
If someone needs details about the fix, let me know
Are you using 1.9.x ? We fixed something less than 2 weeks ago about the master content item in the controller.
20 sites with Orchard? OMG, tell us more!
Hi Sebastien,
I saw the master content item change - and that is actually causing additional problems - there is no Language Dropdown displayed.
rgherman - please can you provide more details on the fix?
rgherman - please can you provide more details on the fix? I want the source code plz for this issue.
I have Orchard CMS 1.9 With enabled Content Localization MODULE
I added localization to the "Custom Link" Content Type.
Now when I go to Navigation and try to add a new translation for a Custom Link - it saves it, but does not appear in the list and in the site.
I noticed that in the database it saves this menu item with MenuId = 0