Skip to content

Making the site multilingual ​

Velum works with WPML, Polylang and TranslatePress. This page is about offering the site in several languages. To translate the theme's own words, such as button labels, into one language, see Translating the theme.

Why does changing the language reload the page? ​

A link to a page in another language does not use a page transition: the browser loads that page the usual way. This is the same with all three plugins and needs no setting. Velum tells the languages apart by their language code, such as en-US and de-DE. Two variants that share one code, such as formal and informal German in TranslatePress, count as one language, and a link between them still uses a transition. Inside one language the transitions run as on any other site: see Changing or turning off page transitions.

Adding a language switcher ​

Velum has no language switcher widget: the switcher comes from the multilingual plugin. Put the plugin's language items into the menu that the header shows: see Editing menus. They then appear in the burger menu with the other items. This was checked with Polylang and WPML. WPML's footer language switcher works too: after a page transition it links to the translations of the new page.

Polylang: the menu stays in one language ​

Polylang does not record which language a menu is in, so a Classic Menu or Burger Menu widget shows the menu picked in it on every page. Choose each language's menu in the widget instead. First create a menu for each language in Appearance → Menus, such as a footer menu in English and one in German. Then open the template that holds the widget in Elementor, click the widget and open Content → Menu. While Polylang is active, a picker for every other language appears under Choose Menu, such as Menu – Deutsch: pick that language's menu there. Choose Menu stays the menu of the default language.

A language whose picker is left empty shows the menu of Choose Menu. The preview in Elementor shows the menu of Choose Menu too, while the site shows each language's own menu.

If each language's menu is assigned to the Main Menu location for its language in Appearance → Menus, Polylang already swaps that menu by itself, and a widget that shows it needs no picker.

Links typed into an Elementor template, such as a button's link, stay the same in every language. For those, give each language its own header and footer: see Polylang: the header or footer stays in one language.

With Polylang, Elementor shows the same header and footer in every language, even after you translate them: it picks a template by its display conditions and does not look at the language. The free plugin Connect Polylang for Elementor adds that step. Once it is installed and activated, each language shows its own translation of a template, and a language without one shows the original.

To translate a header, go to Elementor → Templates → Theme Builder, click Switch to table view and open the Header tab. In the header's row, click the + in the column with the new language's flag. Give the translation a title and click Publish: it starts as a copy of the original. Then click Edit with Elementor, change its texts and links, and publish it again. A footer is translated the same way under the Footer tab.

Keep the display conditions on the original template. A translation's Display Conditions look empty: leave them so, because the translation appears wherever the original does. A condition that names one page, such as a footer hidden on the contact page, reaches that page's translations only when the template is translated too.

A draft translation hides the original

While a translation is a draft, pages in its language do not show the original template. They show the next template whose conditions match, such as the one for the entire site. Publish the translation, or delete it.

WPML needs no extra plugin for this: it shows each language its own translation of a template.

Translating the Properties of a project ​

The Properties rows of a project, such as client and area, belong to each translation of the project: see Editing a project's details and properties.

  • Polylang: a new translation starts with the rows of the original. Edit them in the translation, and the original keeps its own. This holds with Polylang's Custom fields synchronization on as well, which Velum keeps away from the rows.
  • WPML: translating the rows needs WPML's ACF Multilingual add-on, because the rows are an Advanced Custom Fields repeater. With it, a translation starts with the rows of the original, and the Name and Value texts go to the translator. Without it, a translation made in WPML's editor starts with no rows: add them in the translation's editor.
  • TranslatePress: nothing to do. There is one project, and TranslatePress translates its text.

TranslatePress: text is translated on the server only ​

TranslatePress can also translate text in the browser after a page has loaded. Velum switches that part off, because it kept re-translating the animated headings in a loop. Pages, and the pages that a transition brings in, are translated on the server as usual.

My translated labels went back to English after an update ​

That is about the theme's own words, translated with Loco Translate: see My translations went back to English after an update.