Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation of Personal Translation with Symfony Forms #127

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

qrizly
Copy link

@qrizly qrizly commented Apr 22, 2012

No description provided.

@stof
Copy link
Owner

stof commented Apr 23, 2012

Can you do it in the 1.0.x branch instead as the code is for symfony 2.0.x ?

And could you put the form types in the doc instead of giving a link to the gists ?

@mikeSimonson
Copy link

Hi, I am trying to build such a dynamic form with translatable entities and thus I felt on this doc.
I am wondering what's a Sonata form ?

Thanks

@stof
Copy link
Owner

stof commented Apr 25, 2012

@mikeSimonson it is talking about SonataAdminBundle

@mikeSimonson
Copy link

ok

Is there any other way than what I am going to explain to get a form that's dynamically build on top of translatable entities.

Basically the only way I see to do it is :

  • to transform the symfony form class into a service that's loaded with the locale
  • and then use the query builder option of the form builder
  • to pass the locale to the repository using the query builder
  • the repository which is then able to adapt it's query get the entities in the proper locale.

Is that the only/easiest way ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants