Skip to content
RT-Theme 20 WordPress Theme

Multilanguage

The theme’s own texts, such as button labels and headings, are default strings in the theme’s language file. You find it at rt-theme-20/languages/rt-theme-20.pot. You can translate these strings with a plugin such as Loco Translate, or with the Poedit program on your computer.

The translation files must follow the WordPress naming convention, for example de_DE.po and de_DE.mo. If you use other names, the theme does not find your translation. Upload files made with Poedit into the wp-content/themes/rt-theme-20/languages folder.

The full, current steps for Loco Translate and Poedit are in Translating theme strings.

WPML lets one site show the same content in several languages. You do not need a separate site for each language: you run one site on one domain and show every page, post and product in each language. How to set up WPML, translate a page and translate menus is explained in Translating with WPML or Polylang. This section covers what is specific to RT-Theme 20.

When WPML is active, the theme shows the language flags on your site, below the navigation. Visitors click a flag to view the page in that language.

  1. Finish the page in your default language, including its featured image, other images and attachments, and publish it.
  2. In the post or page list, click the plus icon in the column of the other language. You can also translate the page with the WPML translation editor.
  3. Translate the content and publish the translation.
  4. Repeat for each language.

Besides WordPress posts, the theme has custom post types that you translate in the same way: Product Showcase (with Product Categories), Team and Testimonials (with Testimonial Categories). Like WordPress posts, they can be grouped into categories. To list posts by category:

  1. Create a post.
  2. Create a category.
  3. Attach the category to the post.
  4. Publish the post.

A category page lists all posts attached to that category in the order you chose. You can add categories to a menu, so that a click shows the list of posts in that category. When you translate the category and its posts, the translated category page lists the translated posts in the other language.

WPML comes with an add-on called String Translation. RT-Theme 20 registers its own fields with it, so you can translate them there instead of creating copies of the content. You can read more about the add-on on wpml.org.

Only the fields the theme registers appear in the String Translation list, for example:

  • the copyright text;
  • the slogan;
  • the social media texts;
  • the breadcrumb text;
  • and many more.

For widgets that string translation does not cover, WPML recommends plugins such as Widget Logic, which show a widget in a widget area only for a certain language. See the WPML guide Translating widgets.

WPML has its own documentation and support forum, so ask there how the plugin works; we support problems in the theme’s own code.

Polylang is a free alternative to WPML. When you install it, its language menu appears in the header, the same as with WPML. The plugin has its own Polylang documentation, and the general steps are in Translating with WPML or Polylang.