Geocoding should consider app locale
-
Hi guys,
Great plugin! Just noticed however that the geocoding is not taking the app locale into consideration, although the WP Job Manager plugin does (See
add_geolocation_endpoint_query_args
function inclass-wp-job-manager-geocode.php
, line 156). So all geocoded addresses are currently always in English.I’d gladly create a PR, but this is not Github. So Here’s my suggested fix:
replace line 100 in
class-importer-jobs-location.php
with the following:$request_url = 'https://maps.googleapis.com/maps/api/geocode/json?' . $search . $api_key; $locale = get_locale(); if ( $locale ) { $request_url = add_query_arg( 'language', substr( $locale, 0, 2 ), $request_url ); }
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Geocoding should consider app locale’ is closed to new replies.