Redirect Amazon to English version

Redirect websites to their English version

< Feedback on Redirect Amazon to English version

Question/comment

§
Posted: 29.09.2022

Hello,

I'm very interested in your new script, but I would like to know how to modify the script without mistakes :
- Redirect Amazon Holland https://www.amazon.nl/ in its English version
- Redirect Amazon Germany https://www.amazon.de/ in its English version

Please ?

Thank you for your answer.

Google Chrome Browser with Tampermonkey

MikhoulAuthor
§
Posted: 29.09.2022

You just have to change the local in the script.

fr_CA is the language I don't want.

en_CA is the language I want

fr is the language I don't want.

en is the language I want.


In my script I use window.location to read the url and to change it to what I want: https://www.w3schools.com/js/js_window_location.asp

In your case this is the URL you don't want: https://www.amazon.nl/AMD-Ryzen-5800X-Box-XX-Large/dp/B0815XFSGK/

And this is the url you want: https://www.amazon.nl/-/en/dp/B0815XFSGK/

So your script will have to remove/replace the middle of the URL to have it in the language you want.

https://www.w3schools.com/jsref/jsref_replace.asp

Try and learn, you can't not broke anything, it's not that hard it just take time and trials/errors and you will succeed and be proud of you. :-)

§
Posted: 01.10.2022

Hello,

Here are the changes made to have amazon.de in English.
Unfortunately, it didn't work...
Some examples :
https://www.amazon.de/dp/B000RO9QE0
https://www.amazon.de/Philips-SHE-1350-Ear-Kopfh%C3%B6rer-Schwarz/dp/B000RO9QE0/ref=sr_1_2?__mk_en_GB

In addition, if I also want to add amazon.nl in English, it's possible ?
If yes, it should be like this ?

if (window.location.href.indexOf('de_DE';'nl_NL') > -1) {

var url = window.location.href;
window.location = url.replace(/de_DE/;/nl_NL/, 'en_GB');
}


if (window.location.href.indexOf('/de/';/nl/) > -1) {

var zurl = window.location.href;
window.location = zurl.replace(/\/de\//;/\/nl\//, '/en/');


Thank you in advance for your answer.

§
Posted: 01.10.2022

image image

MikhoulAuthor
§
Posted: 01.10.2022

Right now I don't have the time to look in your issue since I'm in the middle of a moving, message me again in the Christmas vacation if you did not succeed and I should have more time once I will be in my new home.

But try to understand how each JS functions work like window.location.href and other, this way you will be able to customize it lot more. It's not really hard but it take some time and dedication but at the end it's rewarding.

Post reply

Sign in to post a reply.