Internationalization 推进orm 1.6,symfony 1.4嵌入式I18N表格
我使用Proplorm(推进1.6)插件和symfony 1.4.20 我有I18n的书桌,这本书和画廊的书桌有关系,画廊的书桌也有I18n。我填写所有图书表单字段,添加两个图库图像,填写所有图像字段。点击保存-看起来一切正常:book字段正常,第一个和第二个图像已上载,但只有第一个图像填充了i18n字段,第二个图像所有i18n字段为空。有什么问题 (没有重新声明的doSave()、save()、bind()和其他表单方法) 模式: 书籍形式: 书库表格:Internationalization 推进orm 1.6,symfony 1.4嵌入式I18N表格,internationalization,symfony1,symfony-1.4,propel,symfony-forms,Internationalization,Symfony1,Symfony 1.4,Propel,Symfony Forms,我使用Proplorm(推进1.6)插件和symfony 1.4.20 我有I18n的书桌,这本书和画廊的书桌有关系,画廊的书桌也有I18n。我填写所有图书表单字段,添加两个图库图像,填写所有图像字段。点击保存-看起来一切正常:book字段正常,第一个和第二个图像已上载,但只有第一个图像填充了i18n字段,第二个图像所有i18n字段为空。有什么问题 (没有重新声明的doSave()、save()、bind()和其他表单方法) 模式: 书籍形式: 书库表格: 说第二个图像,你的意思是第二个book
说第二个图像,你的意思是第二个book_gallery对象有空的i18n字段(标题字段)?是的,我的意思是第二个book_gallery对象,i18n“标题”字段。
book:
id: ~
title: { type: varchar(255), required: true }
author: { type: varchar(255), required: true }
description: { type: longvarchar, required: true }
sortable_rank: { type: integer, required: true }
is_active: { type: boolean, default: 1 }
_indexes:
active_sort: [ is_active, sortable_rank ]
_propel_behaviors:
sortable:
rank_column: sortable_rank
i18n:
i18n_columns: [title, description, author]
locale_column: culture
locale_alias: culture
default_locale: en
book_gallery:
id: ~
book_id: { type: integer, foreignTable: book, foreignReference: id, required: true, onDelete: cascade }
title: { type: varchar(255), required: true }
image: { type: varchar(255), required: true }
_propel_behaviors:
i18n:
i18n_columns: [title]
locale_column: culture
locale_alias: culture
default_locale: en
$languages = LanguageQuery::create()->getAllAsArray(); // returns like array('en' => 'english', ...);
$this->embedI18n(array_keys($languages));
$this->widgetSchema->setLabels($languages);
$this->embedRelation('BookGallery', array(
'title' => 'Application book store list',
'item_pattern' => 'Application book store %index%',
));
$languages = LanguageQuery::create()->getAllAsArray(); // same as in book form
$this->embedI18n(array_keys($languages));
$this->widgetSchema->setLabels($languages);