Using the free Polylang plugin, you can set up a multilingual website in WordPress to internationalize your content and grow your audience. If you are monetizing such a website with ads, delivering those explicitly for the specific users’ language makes sense for several reasons.
The two most important reasons are content relevance and user experience. For one thing, you can achieve higher click-through rates if your ads target your users in the appropriate language. This improvement is essential for banners that contain text.
In addition, you can improve your visitors’ conversion rates if you redirect users to target pages in their own language. Landing on a page that meets their language enhances the visitor’s user experience.
In this tutorial, you will learn how to use Advanced Ads to supply ads according to the language of your content.
Table of Contents
Targeting ads by the language condition
I recommend you turn to the Languages display condition to provide ads for a specific language version of your content. It becomes available when both plugins, Polylang and Advanced Ads, are enabled. After adding the condition to an ad or placement, you may start fine-tuning.
In the settings of this condition, choose from the pool of languages you have previously set up in Polylang. In this way, you can define for which languages an ad should be visible and for which not.
This quick setting is perfect for delivering ads for language-specific posts and pages. But on archive pages like category pages, this targeting does not work. It would be best if you switched to the URL parameter condition for this use case.
Targeting ads by language-specific URL parameter
Since Polylang inserts a country code for the translations in the URL slugs, using Advanced Ads Pro’s URL parameter display condition is a comfortable way to analyze these slugs and target ads to specific languages.
For example, you wouldn’t show ads on German-language pages according to their defined Polylang language “German”. Instead, you would target ads to pages with URL slugs that contain “/de/”.
Targeting ads with the help of the URL parameters display condition also works on archive pages, e.g., category pages. But you must ensure that their URL slugs contain the specific country code.
A time-saving feature of Advanced Ads Pro is the possibility of adding conditions not just to individual ads, but to entire placements. It allows you to create a custom placement for a specific language!
Thanks to this, you don’t have to set these conditions for every ad you include directly or with an ad group.
Translating the ad label
The Polylang plugin also allows you to translate certain strings of your WordPress site. Find this option in your WordPress backend under Languages > String Translations.
Among other things, there you may translate the Advanced Ads ad label into the languages you’ve set up. If you translate the ad label for your used languages, Polylang will adhere to these translations. This means that the ad label will appear in the language defined for that content in Polylang.
Imagine that you have created a post in English and in German (de). Also, you have translated the Advanced Ads ad label in Polylang from “Advertisement” to “Werbung” (de).
Now, on all English posts, pages, and archive pages, the ad label appears as “advertisement”. Meanwhile, it changes on the German language pages, where instead of “advertisement”, it now says “Werbung”.