How to Build a Multilingual WordPress Website- Step 6: Translating Sidebars, Menus & More

How to Build a Multilingual WordPress Website – Step 6: Translating Sidebars, Menus & More

Category: Technology, Website Translation

Welcome to Step 6 in the How to Build a Multilingual WordPress Website blog series, where you’ll learn how to translate meta content on your website, which is basically the content around your main content. Step 5 is right here if you need to catch up on the content translation “baby” steps. And if you want to send a developer to watch our video guide of the same topic, here is the link.

How to Build a Multilingual WordPress Website - Meta

What is meta content? Great question, all of the sidebar content is considered “meta.” (Defined as “beyond” if you’re into grammar. And in this case, “beyond” your main content.) This content, in the example, is an Archives widget, a Categories widget and an Upcoming Events widget.

Translating WordPress Widgets

What’s a widget? Another great question. It’s simply a block within your website that performs a specific function. Some come pre-translated in certain WordPress themes. If yours did, you can simply click on the supplied language and—poof—there’s your translation.

However, you may notice that your widget headlines aren’t translated. No worries. Simply go to your Widgets page (under Appearances) and find the widgets that you want to translate. Now notice the Title field. It’s probably in English. Just delete that content and click “save.” Now it’s translated!

How to Build a Multilingual WordPress Website - Widget

Let’s kick off the content translating by getting our hands dirty early. In other words, we’re going to manually translate content through WPML—it’s the best way to learn immediately. 

Translating WordPress Plugins

The above “fix” handled your widgets. But what if you downloaded a plugin and added that to your website? Here’s how you translate that.

However, before we dig deep into string translation, you may want to trust a professional translation partner. Yes, that’s a sales pitch, but string translation is nothing to sneeze at, as you’ll see in the following paragraphs. Any mistakes–and they’re easy to make–will be amplified within this section (and hard to find and fix).

To use a translation agency, simply find the strings you need translated, export them as an Portable Object file (.po extension) and send them to your guru.

If you’re ready to dive in on your own, feel free. Go to the WPML page within your admin navigation and go to String Translation.

You can also use a professional translation partner for string translations. In order to do this you would need to identify the string, export them to PO (portable object) files and then pass it on to the translation agency.

Warning: String Translation is an add-on for WPML. If you have a license, no worries, you’re good. Just go to WPML.org and download it. It’s very handy, as you’ll see.

Now, let’s assume you have String Translation. You may have noticed that the number of strings is mind boggling. Depending upon your website, this number could be HUGE. However, you’re able to search what you need using the Search form at the top.

You’ll want to search strings that are thematic to what you want, such as “widgets” in this example, then type in your specific search. Once you find the plugin you want, say, Upcoming Events, all you have to do is click Translations and type (or cut and paste) your new translation. Note: For the translation to appear within your website, you’ll click to not only click Save, but check the Translation is complete box.

Translating Menus & Navigation

Let’s start with our main navigation.

How to Build a Multilingual WordPress Website - Menus and Navigation

There are two ways to translate them:

  1. Manually
  2. Automated

The Manual Way

For the manual way to translate your navigation, simply go to Appearance within your admin navigation and click on Menus. You’ll then see your menu structure, and, to the right, you’ll see a Spanish link. Click that link. (Yes, this is very easy so far.)

How to Build a Multilingual WordPress Website - Manual Translation

Now you can create your own menu name (such as Spanish Menu) and you’ll notice “Translation of Primary Nav.” Again, this is almost self-explanatory (yay WordPress!).

What you’ve now done is created a mirror of your English menu navigation. You can now create a menu much like any other menu. Simply connect to the pages you want to connect to. (The simple way is to just click Select All and Add to Menu. Wham, you’ve now translated your English menu to Spanish.)

If you now go see the homepage of your site, you’ll notice that the Spanish version of the menu hasn’t changed. What gives? Just go to WPML, then Languages, then click on Menu Language Switcher. Here you can click Primary Nav, then Save and you’re golden. Now go back to your homepage, reload and you’ll notice a drop down menu with access to both mirrored menus (English and Spanish).

Now for the automated way to translate.

The Automated Way

Everyone wants the automated way, of course. However, you’ll need to keep a close eye on changes that are automatically made. Why? Ever seen 2001: A Space Odyssey? Or Alien? Robots can’t always be trusted.

To get started, you’ll need an add-on: WP Menus Sync. (Again, free if you have a WPML license. Just go to WPML.org to download it.)

Now, go to your WPML navigation in your admin section and click WP Menus Sync. You’ll see that WordPress already knows that the English and Spanish navigation need to be synced. (Sometimes, robots are good.) All you have to do now is click Sync and you can choose what menu items you want to Sync. (We would choose “All” but that’s up to you.)

Warning: Depending upon your page structure, the automated sync may not be apples-to-apples, so make sure you double-check every translation.

So there you go! You’ve officially started to translate your website! In our next blog, we’ll tackle how to handle SEO within your multilingual WordPress website.