Multi Language
Localizing and translating the theme
Section titled “Localizing and translating the theme”The theme’s own text strings, such as button labels and headings that the theme adds, are in a language file that comes with the theme. The file is businesslounge.pot, in the businesslounge/languages folder. You translate these strings with Poedit or with the free Loco Translate plugin. Translating theme strings explains both ways, the file names WordPress expects and where to put the translated files.
Things to know for BusinessLounge:
- Name the translation files after the WordPress language codes, for example
de_DE.poandde_DE.mo. If the names differ, the theme does not find your translation. - If you upload Poedit files by hand, put them in the
wp-content/themes/businesslounge/languagesfolder.
If you do not like some of the default English wording of the theme, create a translation file called en_US.po (and en_US.mo) and change the wording there. You do not need to change the theme’s core files.
WPML plugin
Section titled “WPML plugin”WPML (the WordPress Multilingual Plugin) lets your 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 each page, post, portfolio item or product can have a version in another language.
Translate your site with WPML or Polylang explains how to add languages and translate pages, posts, categories, menus and widgets. In the current WPML, you translate a page or post with the plus icon in the language column of the post list, or with the WPML translation editor. The sections below cover what is specific to BusinessLounge.
Changing languages
Section titled “Changing languages”When WPML is active, the header shows a language menu icon. Visitors use it to view a page in another active language, if the page has a translation in that language. You can show or hide the icon in Appearance › Customize › Styling Options › Header (see Header).
- A page or post that has no translation in a language does not appear in that language.
- The language menu lists only the languages you activated.
Translating pages and posts
Section titled “Translating pages and posts”Create and publish the page or post in your default language first, with its featured image and other images. Then add the translation for each other language and publish it. If you do not translate a page or post, it does not appear in the other language, and a visitor who switches language on that page lands on the home page of the other language.
If your WPML version has the Blog Posts to Display setting, choose Only Translated Posts. The theme does not support the All Posts setting. For help with WPML issues that come from the theme, create a support ticket in your dashboard.
WPML and categories
Section titled “WPML and categories”The theme’s custom post types, Portfolio and Testimonials, can be grouped in categories, just like WordPress posts. Team members have no categories. To list posts by category:
- Create a post.
- Create a category.
- Assign the category to the post.
- Publish the post.
A category lists all posts assigned to it, in the chosen sort order. You can add categories to a menu, so that clicking the menu item shows the posts of that category. When you translate the category and the posts, each translated category lists the translated posts of its language.
Create the categories and their translations for each language first. When you then translate a post that has a category, WPML assigns the translated category to it for you.
WPML String Translation
Section titled “WPML String Translation”WPML comes with an add-on called String Translation. BusinessLounge registers the text of many of its settings with it, so you can translate them there instead of duplicating content. Read more about String Translation on wpml.org.
Not every string appears in String Translation. Only the fields that the theme registers are listed, for example:
- the copyright text
- the slogan
- the social media links
- the breadcrumb text
- and more
Different widgets per language
Section titled “Different widgets per language”For widgets that String Translation does not cover, WPML advises using a plugin such as Widget Logic or Dynamic Widgets, which shows a widget in a widget area only for a given language. The WPML documentation explains how to translate widgets.
Support for WPML
Section titled “Support for WPML”We cannot help with how the WPML plugin itself works. WPML has its own support forum and documentation, with free and paid help. We support the theme’s own code. The WPML documentation covers the common questions about working with WPML in a theme.
Polylang plugin
Section titled “Polylang plugin”Polylang is a free alternative to WPML. When you install it, the language menu appears in the header, as it does with WPML. Read the Polylang documentation to set it up, or see Translate your site with WPML or Polylang.
Get all RT-Themes designs, updates and support with a single Club license.
Join the Club