• Resolved egyptik

    (@egyptik)


    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 in class-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 );
    }
    • This topic was modified 2 years, 9 months ago by egyptik. Reason: formatting
Viewing 1 replies (of 1 total)
  • Plugin Author WP All Import

    (@wpallimport)

    Hi @egyptik,

    Thanks for the suggestion! I’ve added an internal ticket with your fix so that it can be reviewed and possibly implemented in the next release.

Viewing 1 replies (of 1 total)
  • The topic ‘Geocoding should consider app locale’ is closed to new replies.