This is a Wordpress plug-in that overrides Polylang's default language detection (based on user agent's Accept-Language header) setting the language = Swahili for users geo-located in Swahili-speaking countries, since they usually have the user-agent in English. If the user does not come from a Swahili-speaking country, continue with the usual Polylang language detection logic.
- Clone this repo into
wp-content/plugins/swahili-geodetect-polylang
. - Run
composer install
. - Download MaxMind's GeoLite2 Country database and name it
GeoLite2-Country.mmdb
. To download it you need a MaxMind API Key, then you can head to a link like this:https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-Country&license_key={your_maxmind_license_key}&suffix=tar.gz
. - Enable the plugin "Swahili Geo-detect for Polylang" in the plugins section of WP Admin panel.
A: No
A: No
A: Kenya and Tanzania. If you want me to include Congo, please open an issue asking for it.
A: its license does not allow to redistribute the files.
A: it would be pointless given the complexity of the installation.