Hi @perrinechaissac,
Good question, I should have looked at that before.
I’m going to use this tutorial to look at this:
https://wpstackable.com/blog/how-to-translate-your-blocks-using-wpml-multilingual/
…though tomorrow’s probably the earliest I could reply.
Hi @perrinechaissac,
What would you like to translate?
1. The code of the Block Lab plugin, like https://cldup.com/UVWGBFyK_7.png
2. Block content from Block Lab blocks. For example, if you use Block Lab to create a hero block with the text ‘Learn more,’ translate that text.
3. Both
For number 1, it’s possible to translate the Block Lab code using Loco Translate, as you mentioned.
But I think that plugin won’t help for number 2 above, the content of the blocks.
For example, here’s the Loco Translate UI:
https://cldup.com/lmxtUQvEw6.png
For number 2 above, I haven’t tested WPML. It’s a premium plugin, requiring an $80 license for block translation.
Block Lab saves block content the same way any other dynamic block does, in the post content as attributes.
So I can’t think of a reason why WPML wouldn’t work with BL. I just can’t say, because I haven’t tested it.
Have a great weekend, and thanks a lot for bringing this up.
Hi Ryan,
Thank you for your answer.
Indeed I want to translate content that appears in front (so n°2).
I have already tested WPML (I already own a licence for multiple sites) and WPML doesn’t recognize texts inside BlockLab (for example : Learn more)…
Will this be something you will be working on ?
Thanks,
Have a nice day
Hi @perrinechaissac,
Thanks for letting me know WPML isn’t working for post content from Block Lab blocks.
There’s an issue for this:
https://github.com/getblocklab/block-lab/issues/428
I can’t promise that we’ll work on it. But I made a comment that you noticed that WPML couldn’t translate Block Lab content. If we do work on it, that issue will be updated.
Hi,
Thank you, I will keep track of updates for the plugin. In the meantime I will duplicate and change content in each language.