gillish

Use Cairnstone on a multilingual site

Cairnstone blocks A piece of a page, such as a paragraph, a picture or a button. In WordPress you build a page by putting blocks one after another. are ordinary WordPress blocks, so a translation plugin An add-on you install in WordPress to give your site new features. Gillish Cairnstone and Gillish Core are plugins. handles them with the rest of the page. With WPML, Cairnstone tells the plugin which block settings are texts. With Polylang or TranslatePress, some blocks keep their text in the block’s settings, such as the How-to steps, so check one block of each kind before you rely on it.

WPML

WPML sends the texts of a page to a translator, one text at a time. Cairnstone ships a file, wpml-config.xml, that tells WPML which settings of each block are texts. You do not set anything up: WPML reads the file by itself when Cairnstone is active.

  • What you need. WPML Multilingual CMS and its String Translation add-on, both active. WPML reads block settings only while String Translation runs.
  • What a translator gets. The words a visitor reads or hears: headings, labels, button texts, list rows, questions and answers, captions, alternative texts for pictures, table cells, the lines and steps of a recipe, the rows of a price list, the plans and features of a pricing table, and more.
  • What a translator never gets. A block’s look, colours, colour set, icon, sizes, ids and rules. A translator cannot change how a block looks or who sees it.
  • Links. A button’s or a card’s address is offered as a link, so a translated page can point at the translated page.
  • Post Grid. On a translated page, a Post Grid lists the posts and the category you picked in that page’s language.
  • Blocks inside blocks. A Container, Columns, Tabs, an Accordion or one of your own saved blocks holds other blocks. Their texts are translated in the same way.
  • Kept as you wrote them. The name of a quiz result, a heading you renamed in the Table of Contents, and price zones. Rules and matching depend on these, so they are the same in every language.

With every translation plugin

  • To show a block by language, use the Language signal in the Visibility panel’s custom rule builder. It reads the language the visitor’s browser asks for, not the language your translation plugin gave the post. A language you pick also matches its regional forms: Norwegian Bokmål (nb) matches a browser that asks for nb-NO, while a regional choice matches only itself. To show a block by the post’s language, use your translation plugin’s own rules. See Show different content to different visitors.
  • Each variant of a Conditional Content block holds its own content, which your translation plugin translates with the post. The variant’s name and rule are block settings; check that your plugin carries them over.

Next, read Control how Cairnstone loads its styles.

Trails

Cairnstone