Admin guide
Page blocks 🚧

Page block translations

New in Madoc v2.2

When editing page blocks there is now the option to configure language options, meaning you can show separate blocks for different site locals. This is especially useful for custom blocks where auto language translation isn't possible

When in edit mode for each block there is a 'Set language' button which is used to configure the languages, we will use the 'Heading 1' block in this example.

The options given are based on which languages are installed on the site. By setting this block as English(en) it will only show on the English lang site.

If we want to show another block for the Welsh site we first have to add a new 'Heading 1' block. Then adjust the language options for Cymraeg(cy).

We also want to make sure that the Language sort key is the same on both blocks. This is what will allow the switching.

Now when exiting edit mode and switching between English and Welsh you will see the two separate blocks!

Notice if changing to a third language, in this case Dutch, no block is rendered? If we go back into edit mode and select 'Use as fallback'

Now the English block is rendered if there is no block available for the chosen language!