clemenlg Posted June 18, 2014 Share Posted June 18, 2014 (edited) Hi, I'm trying to do a new module for prestashop 1.5.x, but i have a problem, because i want to do a multilingual text, and i can't see the language flags. I read a lot of posts, but i can't solve this issue, i can't show this flags... public function displayForm() { $default_lang = (int)Configuration::get('PS_LANG_DEFAULT'); $fields_form[0]['form'] = array( 'legend' => array( 'title' => $this->l('Settings'), 'image' => '../sample/image.gif' ), 'input' => array( array( 'type' => 'textarea', 'label' => $this->l('Your text'), 'lang' => true, 'rows' => 10, 'cols' => 100, 'name' => 'example1', 'desc' => $this->l('Example:').' bla, bla, bla...', 'required' => true ) ), 'submit' => array( 'title' => $this->l('Save'), 'class' => 'button' ) ); $helper = new HelperForm(); $helper->module = $this; $helper->name_controller = $this->name; $helper->token = Tools::getAdminTokenLite('AdminModules'); $helper->currentIndex = AdminController::$currentIndex.'&configure='.$this->name; $helper->languages = Language::getLanguages(); $helper->default_form_language = $default_lang; $helper->allow_employee_form_lang = $default_lang; $helper->title = $this->displayName; $helper->show_toolbar = true; $helper->toolbar_scroll = true; $helper->submit_action = 'submit'.$this->name; $helper->toolbar_btn = array( 'save' => array( 'desc' => $this->l('Save'), 'href' => AdminController::$currentIndex.'&configure='.$this->name.'&save'.$this->name. '&token='.Tools::getAdminTokenLite('AdminModules'), ), 'back' => array( 'href' => AdminController::$currentIndex.'&token='.Tools::getAdminTokenLite('AdminModules'), 'desc' => $this->l('Back to list') ) ); $example1 = (array)Configuration::getInt('EXAMPLE1'); foreach ($example1 as $lang => $value) { $helper->fields_value['example1'][$lang] = $value; } return $helper->generateForm($fields_form); } codigo1.png: html result, without language flags resultado_codigo1.png: result view cosigo2.png: html result, with language flags (Prestashop CMS module) Can anyone help me? I can't fix it Regards P.S.: Sorry for my english :S Edited June 25, 2014 by clemenlg (see edit history) 1 Link to comment Share on other sites More sharing options...
clemenlg Posted June 25, 2014 Author Share Posted June 25, 2014 It was a problem with the database tables. ;D Link to comment Share on other sites More sharing options...
dr7tbien Posted May 21, 2016 Share Posted May 21, 2016 Why don't YOU explain the Solution? 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