#106

#drupal core deciding not to support asymmetric translations initially in layout builder is quite painful in a lot of situations. Does anyone know of a sandbox/contrib module that supports this ? If not, I'll probably start writing this soon.

Comments

Ted Bowman on Mon, 13/05/2019 - 15:54

@swentel this is the module I have so far: github.com/tedbow/layout_…

Right now it assumes you had 8.6.x installed and the field was already set to translatable. Though that can still be done manually. This was POC to make sure core wasn't making this impossible.

swentel on Mon, 13/05/2019 - 16:12

Aha, thanks, will look at it!

swentel on Tue, 14/05/2019 - 14:55

Coded something which works for 8.6.x too - see https://github.com/swentel/layout_builder_at. Added an extra hook for 8.7.x to make the field translatable on presave. I'll move this to d.o if that's ok for you

Gábor Hojtsy on Mon, 13/05/2019 - 15:48

I know @tedbow has various use cases mapped out and is working on some. Best to discuss first :)

Ted Bowman on Mon, 13/05/2019 - 15:56

The module is very simple right now. If someone wants to take this as starting point for a contrib module it should work.

I know drupal.org/u/johndevman was interested. Not sure if he started yet. You can find him on #layouts slack.

Ted Bowman on Mon, 13/05/2019 - 15:58

Let me know if I can help. Current patch on drupal.org/project/drupal… does not use the field for translated settings(so a real translatable field can be used.) So it should be able to be used together. Contrib module would have to solve the UX of selecting the type of translation

Kristen Pol on Mon, 13/05/2019 - 19:55

I believe @tedbow wrote something

Bram Driesen on Tue, 14/05/2019 - 08:08

Have a look at: drupal.org/project/entity… with this patch: drupal.org/project/entity… that's what we're using at the moment for a project.

swentel on Tue, 14/05/2019 - 08:22

Looks interesting, but that's not the use I'm trying to solve :)

Ted Bowman on Tue, 14/05/2019 - 15:45

Yep. Sounds good!

Are you going to stick with the name "Asymmetric Translation"? That is what we were using in the d.o issue but I wonder if this is generally people will think of. Sorry I can't think of a better name right now except maybe "Layout Builder Localization".

swentel on Tue, 14/05/2019 - 16:18

Localization sounds good to me too. However, there's also a contrib for paragraphs using that term, so maybe that makes it consistent? (We can always change titles later if we want)

Ted Bowman on Tue, 14/05/2019 - 15:51

Made a small PR github.com/swentel/layout…

sorry didn't actually test it. But should work

Ted Bowman on Tue, 14/05/2019 - 16:22

Ok I didn't know "Asymmetric Translation" was used elsewhere. Sound good then

Tormi Tabor on Tue, 14/05/2019 - 16:51

"Layout Builder Localization" sounds more understandable ;)

Add reply

Plain text

  • No HTML tags allowed.
  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.
Have you written a response to this? Let me know the URL by sending a webmention.