One of the best things about working on WordPress projects is that I’m constantly learning new things. Each website has its own particular needs and challenges, so new techniques often need to be learned in order to develop the website to its full potential.
I recently implemented a plugin for the first time, so I wanted to let you know about the process and what I learned. Hopefully this will be useful information if you need to do the same.
My friend Karo Tak runs a vegan cafe and yoga space in Lisbon, and her cheesemaking has been taking off recently. She wanted to create a separate website showcasing the cheese, related events, and directing customers how to purchase. Enter Gopal Vegan Cheese, the home for information, an events calendar, and ordering of her yummy vegan cheese.
Karo is living and working in Portugal, but she’s not a Portuguese native, and wanted visitors from all over the world to be introduced to her cheese and vegan cheesemaking information. So it was important that the website be both in Portuguese, for local customers, and in English.
To achieve this, I needed to master a new (to me) WordPress plugin: Polylang.
Polylang is plugin with both free and pro versions, that allows you to create multilingual content on your WordPress website. Visitors can easily switch between languages via a switcher in the menu bar or in a widget.
Once you set up the languages that you want to use, the plugin allows you to create a version of every page or post in that language. You can also create widgets and other types of content in multiple languages. The different versions exist as separate entities, but they are linked for easy access.
If you are creating a website that needs to reach speakers of multiple languages, the benefits of Polylang are clear. It doesn’t always make business sense to alienate an entire segment of your audience, just because they don’t speak a certain language!
I used the free version of Polylang for the Gopal website, but depending on your project, you may need to upgrade to the pro version. With that upgrade, you will unlock additional features such as more flexibility with slugs in URLs, and access to premium support.
There were certainly a few challenges that I ran into while implementing Polylang. Some of them were:
- Content visibility: If I hadn’t yet created the Portuguese version of a page, post, or widget, it simply didn’t show up when I was in the Portuguese “mode.” So it became important to be methodical about creating pages or posts, and making sure that there were two versions of each one.
- Menus: Once the languages had been activated, I needed to create a separate menu for each. There wasn’t really an automated way of doing this; I just needed to manually create each menu and assign to the appropriate language. This is something I’ll need to be careful with in the future, as if changes are made to one menu, they will need to be copied across to the other.
- Home page widgets: For the Gopal website, I used the Studiopress theme Cafe Pro, which has flexible home page widget areas. That means that the layout of widgets changes according to the number of widgets in each area. Because I was adding a widget for each language to the homepage, it was changing the layout of the homepage widget areas, but only showing the widget for the activated language. I needed to do some code fixing in the stylesheet to get the widgets to display properly. Of course, this problem wouldn’t have happened with a different theme, but it’s worth noting if you want to use a Studiopress theme with Polylang.
There were also some nice surprises about Polylang, for instance:
- Flag switching: After I had created all the translated content, I installed a language switcher in the main navigation menu (you can also put it in a widget area). Polylang gives you the option of making this switcher text-based, or flags of the countries whose languages are being used. I thought it was pretty cool that the flags were already built-in!
- Content linking: I liked how easy it was to link an English post to its Portuguese translation. Additionally, when looking at the list of pages or posts, little pencil and plus sign icons indicate which content is translated. This made the auditing process super easy, to make sure that all content existed for visitors in both languages.
- WooCommerce integration: Since we were implanting a shop where customers can pre-order cheese, I turned to my favourite eCommerce plugin, WooCommerce. I also found a nice little plugin to make the two play nicely together: WooCommerce Polylang Integration. However, this made the translation side of things tricky, as the new plugin translated the slugs in URLs and made the translated product pages hidden. Once I deactivated the WooCommerce Polylang Integration plugin, all was well.
Overall, Polylang is a really nice plugin for creating multilingual sites, and I hope I get the chance to use it again.
Have you recently tried a new plugin? Maybe this has inspired you to try one on your next project?
Leave a comment below if you do!