As I see it, there is currently no support for exporting custom blocks with multiple languages. Only the default language is exported. Is implementation planned for this?
Note: Normal blocks can be translated without the Structure Sync module.
| Comment | File | Size | Author |
|---|---|---|---|
| #12 | multilingual-support-for-blocks-2921828-12.patch | 5.87 KB | louis-cuny |
Issue fork structure_sync-2921828
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
timkruijsen commentedIt was not yet on the roadmap, but I will try to look into this as soon as possible. If you have any suggestions I'd be very happy to hear them!
Comment #3
nikm commented+1 for Multilingual support
Thank you very much!
Comment #4
awolfey commentedHere's a draft patch for block translation, using the Full method. It works for fields, but isn't really handling much else at this point.
I also noticed while working on this that only the first value of any field is exported/imported. I left that as is.
Comment #5
legolasboThis has a patch so it should be "Needs review"
Comment #6
fidovdbos commented@awolfey thank you for the patch i wil check and see if it fits, i wil fix the issue with only export the first value of fiedls.
Comment #7
colanNew features go into HEAD, which may turn out to be a 2.x branch if we have one.
Comment #8
sinasalek commentedupdated the title
Comment #9
louis-cuny commentedI just added the structure sync module and this patch to a project with already existing blocks in many languages.
The exported structure_sync.data.yml seems correct to me.
Then on a staging environment I did a drush ib --choice=force
The non-english custom blocks disapeared.
Did the patch work for anybody ? Did a do something wrong ?
Comment #10
louis-cuny commentedI took a different way to write the exported block translations.
I handled both exporting and importing in safe, full and forced.
Let me know if everything works as expected for you
Comment #11
louis-cuny commentedFix one missing char causing syntax error
Would be great to have some reviews
Comment #12
louis-cuny commentedBad patch file sorry
Comment #13
louis-cuny commentedComment #14
dabley commentedPatch #12 doesnt apply to the latest version of Structure Sync (v2.0.5).
@louis-cuny - you have flagged this as "Needs Work" but it isn't clear what further work needs to be done. Can you clarify?
Comment #15
louis-cuny commentedThe patch I created didn't work like I expected, I cannot remember exactly what was not working but their was some bugs
Comment #16
ressaJust clarifying that this issue is about custom blocks, since normal blocks are treating as configuration, and can be translated without this module.