Skip to content
NaturaLife WordPress Theme

Multi Language

The theme’s own texts, such as button labels and headings, are default strings in the theme’s language file. All of them are in one file, naturalife.pot, in the naturalife/languages folder. You translate these strings with the free Loco Translate plugin or with the Poedit program. The step-by-step guide, including the file names WordPress expects and where to save the files, is in Translating theme strings.

Loco Translate lets you translate the strings in your WordPress admin, without editing any files by hand. It is the easiest way for most sites.

With Poedit, you create a translation of naturalife.pot on your computer. Name the files the way WordPress expects them (see the WordPress language naming convention), or the theme does not find your translations. Upload the .po and .mo files by FTP into wp-content/themes/naturalife/languages.

WPML (WordPress Multilingual) is a plugin that shows the same content in several languages. With WPML you do not need a separate website for each language. You run one website and show each page, post, portfolio item or product in several languages. How to install WPML, add your languages and translate your content is explained in Translate your site with WPML or Polylang. This section covers what is specific to NaturaLife.

Once WPML is active, visitors switch languages with the Language Menu Icon in the header. Turn the icon on or off in Appearance › Customize › Styling Options › Header Tools (see Header). Visitors see a page in the chosen language when the page exists in that language.

  • If a page or post has not been translated into a language, it does not show in that language.
  • The language switcher lists only the languages you have activated in WPML.
  1. Create the page in your default language, with all its images and content, and publish it.
  2. In the list of pages or posts, click the plus icon in the column of the other language. Or open the page and use the WPML translation editor.
  3. Translate the content and publish the translation.
  4. Repeat for each language.

If you do not translate a page or post, it does not show in the other language. Visitors who switch the language on that page are sent to the home page of that language.

NaturaLife has its own post types: Portfolio, Team and Testimonials. Like the WordPress posts, portfolio items and testimonials can be grouped into categories. To list posts by category:

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

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

WPML comes with an add-on called String Translation. NaturaLife registers the text fields it uses throughout the theme with WPML. Once WPML detects such a string, you translate it in String Translation, so you do not need to duplicate those fields. Read more about the add-on on wpml.org.

For widgets that String Translation cannot handle, WPML recommends plugins such as Widget Logic and Dynamic Widgets. They show a widget in a widget area only for a given language. The WPML documentation explains how: translating widgets.

We do not give support on how the WPML plugin works. WPML has its own support forum and documentation, free and paid, and they cover the common questions about using WPML with a theme. We support only the theme’s own code.

Polylang is a free alternative to WPML. Once you install it, the language menu appears in the header, the same way as with WPML: through the Language Menu Icon header tool. See the Polylang documentation and Translate your site with WPML or Polylang for the setup.