-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
[RFC] Proposal for translatable PHPCR documents (pages, blocks etc.) #4808
Comments
This works btw nicely with the |
@steffenbrem we are also interested in this. currently, we handle PHPCR content translations by manually creating two entities for the locales we support. having them translatable, just like products, would be great. please let us know what's the progress of this and if there is something we can help with. |
@gabiudrescu I've made some good progress on this and currently had to rush an implementation for a client of mine that had to be done quite quickly. I am planning on making a PoC PR in the coming days. I also had some discussion in doctrine/phpcr-odm#704 about Sylius PHPCR translations. |
news ? |
@ibasaw The discussion about this moved to doctrine/phpcr-odm#704, right now I have a working solution running in production. When things are cleared up I could work on a PR to integrate it into the main Sylius repo. There are some important things that need to be considered, such as migrating existing data etc. it has to be a minimum effort without weird stuff going on to do those migrations if we would include this in Sylius. |
Right now I stopped using PHPCR all together, so I don't think I will be able to make my old changes ready for Sylius. Jackrabbit was too slow for me in the end and using a MySQL database worked way better, even though hierarchies are not managed very well in it. Using the I don't know which way Sylius wants to go with it's CMS features, if it really wants to stick with |
So we have a lot of translatable models right now, but some very important ones are missing, such as pages and menu nodes. I am currently trying to find a good strategy to handle this. Since we have the
TranslatableInterface
in the resource component, I was thinking about setting up translations in PHPCR this way. You also have multi-lang build in into the PHPCR ODM of Doctrine, but it has some serious drawbacks, such as not being able to load multiple translations of the same document in the same runtime (I think you can work around it by cloning etc, but still, it feels very different from how Sylius handles translations now).What do you guys think about not using the translations mechanism Doctrine provides for us and simply have a separate document to store translatable fields, just as we do with products etc. We could for example store the translation documents in
/pages/about-us/en
,/pages/about-us/nl
.Being able to do the following would be awesome:
Would love to hear any ideas or feedback on this!
I will probably have this finished for myself on Monday, if this approach is preferred, I will be glad to open source it and provide a PR with the implementation for this.
The text was updated successfully, but these errors were encountered: