Search code examples
internationalizationsymfony1doctrinesymfony-1.4admin-generator

Symfony 1.4 doctrine admin generator display i18n form fields


My problem is that iam using admin generator for model with some extra virtual attributes which i need to have in generator.yml definitions:

config:
  form:
    display: [name, design_by, description, _images, add_image, _videos, add_video]

But the "description" attribute is in i18n mode of doctrine model s it does'nt exists in core model object anymore - moved into i18n model. So iam getting logical error 'Widget "description" does not exist'.

I tryed somthing like:

config:
  form:
    display: [description_i18n]

but did'nt found solution.

When i cut the form display definition into default, form starts working, but it miss my extra fields _images, add_image, _videos, add_video, so i need to have the definition there.

Google doesnt helped too...

Does anybody know how to define i18n widgets into generator.yml? THX!


Solution

  • I had the same problem.

    Diving into the code, I saw that the i18n widgets are grouped into arrays where key are the culture name.

    So I tried to set them into my generator.yml:

    form:
      display:
        'Name / Description (with translations)': [en, es, fr, it]
    

    And succes!!!