SRUTHI R BABU Posted February 5, 2024 Share Posted February 5, 2024 I have a Prestashop 1.7 website where I had to override the ps_mainmenu module ( main file of the override ) . Now the override works fine except the fact that I am not able add a necessary translation for a text. I am sharing below how I have written in the code. Kindly tell me if there is any mistake or am I not looking in the right place for tranlsation in admin panel public function getViewAllLink($menu) { if ($menu['url'] && $menu['type'] == "category") { return [ 'type' => 'view-all', 'label' => $this->trans('ALLES ANZEIGEN', [], 'Modules.Mainmenu.Mainmenu'), 'url' => $menu['url'], 'children' => [], // You can customize this if needed 'open_in_new_window' => false, 'image_urls' => [], 'page_identifier' => $menu['page_identifier'], 'current' => false, 'depth' => $menu['depth'] + 1, // Assuming depth is an integer ]; } return null; } I had checked in admin panel module translations as well as front office translation. All other translations in the main file is similar to this too. I think it's using the new translation system too. One of the fixes suggested was to add the following code public function isUsingNewTranslationSystem() { return true; } but that didn't do the trick Link to comment Share on other sites More sharing options...
JBW Posted February 7, 2024 Share Posted February 7, 2024 Overrides are not scanned for translations. You can try the workarounds mentioned here https://github.com/PrestaShop/PrestaShop/issues/12300#issuecomment-885024909 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now