Open yann-eugone opened 9 years ago
Closing as is a duplicate of #178.
Does anyone have a working example of it? :thinking:
You can now do calls (on 3.x): https://github.com/nelmio/alice/blob/master/doc/complete-reference.md#calling-methods
Not sure to see how calls
may help with this.
I guess, you could use addTranslation(@translation_1)
on your translatable model. But still - you have to build this @translation_1
object on separately as alice supports natively only flat descriptions.
You are talking about "personal translation". With MyModelTranslation model, you can do what you say (you could do this at the moment where the issue where opened).
This is not a strategy I can choose.
Sorry I may have misunderstood your case. I think you can add localised faker providers, cf. localized data generation.
That said I'm not entirely sure about how you register a faker provider only for a specific local.
Hi, before I explain my problem I'd like to thank the contributors of this usefull repository.
I prefixed this issue with
[question]
because I will be very happy that you tell me that there is a way to handle my problem with something existing in this repository.I'm facing a problem in the following context :
Symfony2
projectCMF
I need to load data fixtures, and I need some properties to get translated in several locales.
The problem is : how ?
I'm sad to say that I had to implement my own loader to handle objects properties translation with a pattern like this :
Under the hood, my loader do something like this :
I said that I'm sad to do this because this loader is not as powerfull as the Alice's loader (no faker integration for example), and I rather prefer to use always the same loader against all my projects.
Please, if I missed something in the documentation, tell me, and I will test it.
If there is nothing that suit my need here, and if you are interested in, I can try to make a pull request with some features addition to do the job.
Best regards, Yann