Menu Lists

Create flexible menus straight from October CMS admin

Back to Menu Lists Support

fobus
fobus

Hello,

Menu items doesn't work with Rainlab Translation plugin. But Menu works good. We have uncommented lines for Rainlab Translation in both Menu and Menuitem models. Menu model works good but Menuitem doesn't save any thing on rainlab_translate_attributes table

Am I doning something wrong?

Last updated

Flynsarmy
Flynsarmy

No you're not. As you're probably already aware from the git issue on this topic, it's a problem on the translation plugins end, not mine.

fobus
fobus

@Flynsarmy Thank you for your response. I'm going to check the translation plugin.

vdomah
vdomah

@fobus Did you find the solution for this problem?

AlexeiKo
AlexeiKo

Hello?! 7 month, and no solution?

It's imposible to work with menu without translation.

vdomah
vdomah

AlexeiKo said:

Hello?! 7 month, and no solution?

It's imposible to work with menu without translation.

Also faced that problem. Ended up with creating my own menu plugin. Not so complex logic to do and no features I don't need. It's not ready to publish on the Market but you can check it on github: https://github.com/vdomah/octomenu. Some bugs may appear but I'm ready to assist you with it. There some integrations that allow to create custom menu items: page from CMS section, Rainlab blog post, raw link raw html (example is logout button with data-request attribute)

Last updated

Glitchbone
Glitchbone

Yes, translatable fields are not saved in a relation form... I posted an issue on Github: https://github.com/rainlab/translate-plugin/issues/209

daugirdas21841
daugirdas21841

I've implemented proposed trait https://github.com/rainlab/translate-plugin/issues/209 to plugin, but it still does not translate. The problem is that the last filled language overwrites default language, so I removed from function onEditItem() (plugins/flynsarmy/menu/formwidgets/ItemList.php) $item->fill(Request::input()). Maybe I am not aware of some functionality, but it solved the problem.

Mr.VACO
Mr.VACO

I don't know if anyone will need it. I was looking for a solution to the translation problem and did not find anything really working. Apparently due to the old code of the plugin. The solution came from where I did not expect ... Only 3 lines of code solve thousands of comments.

DECISION:

  • Open the file plugins / flynsarmy / menu / formwidgets / ItemList.php;

  • We are looking for the functions function onCreateItem() and function onEditItem ();

  • Paste the code (WARNING!!! Necessarily paste code BEFORE $item->save() !!!!):

    foreach (Request::input('RLTranslate') as $lang => $value)
        foreach ($value as $k => $v)
            $item->setAttributeTranslated($k, $v, $lang);
  • Profit! Check the work;

Last updated

1-9 of 9