Symfony1 Symfony 1.4管理生成器如何在视图中显示i18n字段
我使用了admin generator,有些表有i18n字段,我的问题是在view/show中没有使用i18n打印字段,但当我编辑show i18n时,显示i18n是正确的,但在show/view中没有绘制这些字段 如何配置以在视图中显示i18n字段 模式是:Symfony1 Symfony 1.4管理生成器如何在视图中显示i18n字段,symfony1,symfony-1.4,symfony-forms,Symfony1,Symfony 1.4,Symfony Forms,我使用了admin generator,有些表有i18n字段,我的问题是在view/show中没有使用i18n打印字段,但当我编辑show i18n时,显示i18n是正确的,但在show/view中没有绘制这些字段 如何配置以在视图中显示i18n字段 模式是: Coleccio: actAs: I18n: fields: [descripcio] columns: nom: { type: string(50), notnull: true,
Coleccio:
actAs:
I18n:
fields: [descripcio]
columns:
nom: { type: string(50), notnull: true, unique: true }
descripcio: { type: text, notnull: true }
is_historic: { type: boolean, notnull: true, default: 0 }
Article:
columns:
coleccio_id: { type: integer, notnull: true }
nom_foto: { type: string(50), notnull: true}
foto: { type: string(255), notnull: true }
relations:
Coleccio: { onDelete: CASCADE, local: coleccio_id, foreign: id, foreignAlias: Article_FK }
Provincia:
columns:
nom: { type: string(50), notnull: true, unique: true }
Punts_Venda:
columns:
provincia_id: { type: integer, notnull: true }
nom: { type: string(50), notnull: true }
direccio: { type: string(100), notnull: true }
ciutat: { type: string(50), notnull: true }
relations:
Provincia: { onDelete: CASCADE, local: provincia_id, foreign: id, foreignAlias: Punts_Venda_FK }
Primera_Persona:
actAs:
I18n:
fields: [nom, descripcio]
columns:
name: { type: string(80), notnull: true }
nom: { type: string(80), notnull: true }
descripcio: { type: text, notnull: true }
Imatges_Primera_Persona:
columns:
primera_persona_id: { type: integer, notnull: true }
nom: { type: string(50), notnull: true }
foto: { type: string(255), notnull: true }
codi: { type: string(100), notnull: false}
relations:
Primera_Persona: { onDelete: CASCADE, local: primera_persona_id, foreign: id, foreignAlias: Imatges_Primera_Persona_FK }
Elements_Singulars:
actAs:
I18n:
fields: [nom, descripcio]
columns:
name: { type: string(80), notnull: true }
nom: { type: string(80), notnull: true }
descripcio: { type: text, notnull: true }
foto: { type: string(255), notnull: true }
感谢您清理symfony缓存(symfony cc),清理浏览器缓存,并在settings.yml中为您的应用尝试以下操作:
i18n: on
你能展示你的控制器、视图和模型吗?