0

I've installed the Google code that automatically translates the websites content to the language of the users browser.

It changes all the text as it should to the language of the browser, including the search options in the dropdowns

So when a search is made for some reason the search function uses the translated word from the dropdown options so they end up on a 404 page. Is there a way to stop translated search options effecting the URL?

Eg.

Correct URL for a Search (example.com/search?dropdown1=answer&dropdown2=secondanswer)

Incorrect URL for a Search (example.com/search?dropdown1=(answer in language of the browser)&dropdown2=(secondanswer in language of the browser))

5

The way to tell Google not to translate any specific items is to use the <span class="e;notranslate"e;> </span> tag for that particular element.

This is documented here and there's an example for it here as well.

| improve this answer | |
  • This solution worked without the e on either side. Example: <span class="notranslate"> {content to not translate} </span> – Trent Jan 8 '16 at 7:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.