Title: Polylang &#8211; Country Detection
Author: Markus Wiesenhofer
Published: <strong>July 20, 2020</strong>
Last modified: September 30, 2022

---

Search plugins

![](https://ps.w.org/country-detection-polylang/assets/banner-772x250.jpg?rev=2343650)

This plugin **hasn’t been tested with the latest 3 major releases of WordPress**.
It may no longer be maintained or supported and may have compatibility issues when
used with more recent versions of WordPress.

![](https://ps.w.org/country-detection-polylang/assets/icon-256x256.jpg?rev=2344040)

# Polylang – Country Detection

 By [Markus Wiesenhofer](https://profiles.wordpress.org/markusfroehlich/)

[Download](https://downloads.wordpress.org/plugin/country-detection-polylang.zip)

 * [Details](https://en-au.wordpress.org/plugins/country-detection-polylang/#description)
 * [Reviews](https://en-au.wordpress.org/plugins/country-detection-polylang/#reviews)
 *  [Installation](https://en-au.wordpress.org/plugins/country-detection-polylang/#installation)
 * [Development](https://en-au.wordpress.org/plugins/country-detection-polylang/#developers)

 [Support](https://wordpress.org/support/plugin/country-detection-polylang/)

## Description

Polylang is a fantastic plugin to make WordPress multilingual. The Polylang extension
enables you to detect the preferred language according on the country.

If your website contains 2 different locales with the same language (e.g. de_DE 
for German/German and de_AT for German/Austria) then Polylang automatically sets
the language according to the browser settings.

Austrian website visitors who have set their operating system / browser to Germany(
e.g. the Devices was buyed in Germany) will always be redirected to de_DE.

This Plugin detects the preferred language according on the visitors country and
will set the language correct to de_AT.

Please notice that the IP API is only for non-commercial use allowed.

#### Required Plugin

 * [Polylang Pro](https://polylang.pro) by WP SYNTEX – Polylang allows you to create
   a bilingual or multilingual WordPress site.

## Installation

 1. Install the required Polylang Plugin available at https://polylang.pro
 2. Upload ‘pll-country-detection’ to the ‘/wp-content/plugins/’ directory, or install
    the plugin through the WordPress plugins screen directly.
 3. Activate the plugin through the ‘Plugins’ screen in WordPress.
 4. Enable the “Detect browser language” option in “Languages > Settings”

## FAQ

### How does the country detection works?

The plugin detects the country with the IP Geolocation API (https://ip-api.com/).

If no available language by country is found, the language of the browser is preferred.(
https://polylang.pro/doc/detect-the-browser-preferred-language/)

### I found a bug, what shall I do?

If you have found a bug in my plugin, please send me an email with a short description.

I will fix the bug as soon as possible.

### You like my plugin and you’d like to support me?

Thank you very much!
 In case you want to show how much you appreciate my work, 
I’d be very grateful if you could give me positive rating with WordPress-Page and/
or donate a small amount to me.

## Reviews

![](https://secure.gravatar.com/avatar/4411abd504c370e69119cc9d8d65b3ca4865f11356bde1fc63028cbb3f46fc8a?
s=60&d=retro&r=g)

### 󠀁[works great](https://wordpress.org/support/topic/works-great-6959/)󠁿

 [lschweig](https://profiles.wordpress.org/lschweig/) July 21, 2020

already in use – works great

![](https://secure.gravatar.com/avatar/f77fbde65964992ffacbbbae8260097491883794a07d77c75157783d9af8d0d2?
s=60&d=retro&r=g)

### 󠀁[Very good](https://wordpress.org/support/topic/very-good-4962/)󠁿

 [fank](https://profiles.wordpress.org/fank/) July 21, 2020

The country detection works really well!

 [ Read all 2 reviews ](https://wordpress.org/support/plugin/country-detection-polylang/reviews/)

## Contributors & Developers

“Polylang – Country Detection” is open source software. The following people have
contributed to this plugin.

Contributors

 *   [ Markus Wiesenhofer ](https://profiles.wordpress.org/markusfroehlich/)

“Polylang – Country Detection” has been translated into 3 locales. Thank you to 
[the translators](https://translate.wordpress.org/projects/wp-plugins/country-detection-polylang/contributors)
for their contributions.

[Translate “Polylang – Country Detection” into your language.](https://translate.wordpress.org/projects/wp-plugins/country-detection-polylang)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/country-detection-polylang/),
check out the [SVN repository](https://plugins.svn.wordpress.org/country-detection-polylang/),
or subscribe to the [development log](https://plugins.trac.wordpress.org/log/country-detection-polylang/)
by [RSS](https://plugins.trac.wordpress.org/log/country-detection-polylang/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

#### 1.3.1

 * Fix – Check if the class Polylang_Country_Detection already exists

#### 1.3.0

 * Feature – Anonymize the IP addresses from the client
 * Dev – Changed the geolocation API from ip-api.com to iplocate.io
 * Dev – Check compatibility with latest Polylang and WordPress Version

#### 1.2.1

 * Fix – Filter all non active languages

#### 1.2.0

 * Translation functionality added

#### 1.1.0

 * Fix – Lanaguage variable return issue

#### 1.0.0

 * Initial Release
 * Check compatibility with latest Polylang and WordPress Version

## Meta

 *  Version **1.3.1**
 *  Last updated **4 years ago**
 *  Active installations **1,000+**
 *  WordPress Version ** 4.9 or higher **
 *  Tested up to **6.0.17**
 *  PHP Version ** 5.6 or higher **
 *  Languages
 * [English (US)](https://wordpress.org/plugins/country-detection-polylang/), [French (Belgium)](https://fr-be.wordpress.org/plugins/country-detection-polylang/),
   [French (France)](https://fr.wordpress.org/plugins/country-detection-polylang/),
   and [Persian](https://fa.wordpress.org/plugins/country-detection-polylang/).
 *  [Translate into your language](https://translate.wordpress.org/projects/wp-plugins/country-detection-polylang)
 * Tags
 * [browser](https://en-au.wordpress.org/plugins/tags/browser/)[country](https://en-au.wordpress.org/plugins/tags/country/)
   [detection](https://en-au.wordpress.org/plugins/tags/detection/)[multilingual](https://en-au.wordpress.org/plugins/tags/multilingual/)
   [polylang](https://en-au.wordpress.org/plugins/tags/polylang/)
 *  [Advanced View](https://en-au.wordpress.org/plugins/country-detection-polylang/advanced/)

## Ratings

 5 out of 5 stars.

 *  [  2 5-star reviews     ](https://wordpress.org/support/plugin/country-detection-polylang/reviews/?filter=5)
 *  [  0 4-star reviews     ](https://wordpress.org/support/plugin/country-detection-polylang/reviews/?filter=4)
 *  [  0 3-star reviews     ](https://wordpress.org/support/plugin/country-detection-polylang/reviews/?filter=3)
 *  [  0 2-star reviews     ](https://wordpress.org/support/plugin/country-detection-polylang/reviews/?filter=2)
 *  [  0 1-star reviews     ](https://wordpress.org/support/plugin/country-detection-polylang/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/country-detection-polylang/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/country-detection-polylang/reviews/)

## Contributors

 *   [ Markus Wiesenhofer ](https://profiles.wordpress.org/markusfroehlich/)

## Support

Got something to say? Need help?

 [View support forum](https://wordpress.org/support/plugin/country-detection-polylang/)

## Donate

Would you like to support the advancement of this plugin?

 [ Donate to this plugin ](https://www.paypal.com/donate?business=DUKJP25LKTX62&currency_code=EUR)