Problem/Motivation

The autocomplete ajax call to the geocoder API is always in the default interface language of the site.
On multilingual sites, the autocomplete will always be in the same language because the call to the geocoder API does not take into account the current language prefix. The current language of the geocoder API route is used as locale.

Steps to reproduce

  • Instal Geocoder
  • Multilingual setup
  • Have an input field that uses the geocoder autocomplete functionality in the different languages
  • Use the autocomplete functionality on a non-default language page
  • The autocomplete results will always be in the default language

Proposed resolution

  • Update geocoder.drupal.js so path prefix (= language prefix) is used when composing the geocoder API URL

Please note that autocomplete functionality is broken in 8.x-4.21, see #3418576: Autocomplete JS not working. If you are using this version of geocoder, this patch is needed to make this work.

Remaining tasks

Issue fork geocoder-3418621

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

grietdk created an issue. See original summary.

grietdk’s picture

Issue summary: View changes
Related issues: +#3418576: Autocomplete JS not working

  • itamair committed a5b0e369 on 8.x-4.x authored by grietdk
    Issue #3418621 by grietdk: Autocomplete does not take into account...
itamair’s picture

Status: Active » Fixed

Thanks. Implemented in both in 8.x-4.23 and 8.x-3.47 ...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.