Prestashop模块多语言形式

时间:2012-12-10 10:33:13

标签: prestashop

我正在为prestashop 1.5开发,并且找不到任何关于如何开发多语言表单的示例(甚至不是prestashop 1.4的旧文档)。我怎样才能实现这样的enter image description here

互联网上没有任何文档,反向工程代码现在太难了。

1 个答案:

答案 0 :(得分:0)

Try adding **'lang' => 'true'** in your renderForm() function in your controller like the following code

     array(
    'type' => 'textarea',
    'label' => $this->l('Text'),
    'name' => 'text',
    'lang' => true
    ),

In your class in $definition array add this line : 

     'text' =>  array('type' => self::TYPE_HTML, 'lang' => true,'validate' => 'isCleanHtml'),

Finally, add the field in **lang table** of your module or existing table
相关问题