Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Language searches #12

Open
bonucci opened this issue Nov 4, 2017 · 2 comments
Open

Language searches #12

bonucci opened this issue Nov 4, 2017 · 2 comments

Comments

@bonucci
Copy link

bonucci commented Nov 4, 2017

How i would configure the autocomplete to make searches in other language, in spanish or portuguese?

@perezbalen
Copy link

same here. I noticed that the mexico store searches the us sotre, but has a flag of Language "es_MX".
The Spain store searches the UK store, but has a flag of language "es_ES". Yet I havent been able to figure out how to put that in the request.

  var opts = {
      host: "completion.amazon.co.uk/search/complete"
      . . .   
    , language: "es_ES"
     . . . 

@raphael-abreu
Copy link

raphael-abreu commented Dec 7, 2017

In the request you can define a keyword as "l=LOCALE".
Strangely enough in my tests, my language (l=pt_BR) would only work along with the keyword "mkt=526970". Maybe you should find the mkt value for your language and try it out*.

Once you found out, you can change the following line and make requests using the plugin

newScript.src = 'http://completion.amazon.com/search/complete?search-alias=aps&client=amazon-search-ui&mkt=1&q='+prefix+'&callback=AmazonAutocomplete.AmazonJSONPCallbackHandler_'+this._id;

* Quick tip: Go to amazon domain on your country. Open the network tab on chrome dev tools and start typing on the amazon search bar. You will see the entire request parameters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants