Geoposty wordpress plugin determines your visitor's location from their ip address, then displays dynamic content that is spescific to their area.
Many more plugins are also used for geo targeting like Geo Redirect, WordPress Geo IP Redirect, Source Redirect Site, WP Geocode Marketing Intelligence these all are free, There's a premium plugin also for geo targeting named Flytonic Geo Target
But!!!
If I'm a French user, but my IP shows I'm in Germany while I use an English browser. The most convenient would be English for me, because that is my choice.
There's a PHP superglobal variable, called $_SERVER
. It stores information about the server running the page and about the client who requested the page. One string of this array's parameters is called HTTP_ACCEPT_LANGUAGE
, sent by the browser, which in this case will be en. It can be accessed from PHP as: $_SERVER['HTTP_ACCEPT_LANGUAGE']
.
This can be used to get the specified content for example with a custom field which contains values what this string can be.