Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

Every time I navigate to a different page I have to reselect the language. Is there a way to get around this?

share|improve this question
    
Do you want to give us a link to it? You specify the page language in the javascript so it should work. –  paulmorriss Jul 22 '11 at 13:05
    
I've just thought - do you mean you have to reselect the language you are translating from or to? –  paulmorriss Jul 22 '11 at 13:37
    
I think you understand now, ever time i go to another page, I have to reselect the translate language. I've placed the translate widget code in a global header. It doesn't seem to persist between pages though. –  MVCylon Jul 22 '11 at 13:50
    
Sounds like you have a bug. The desired behavior is the default. Try to temporarily disable other javascript and cookie-setting code to see if there is interference. –  Itai Jul 22 '11 at 19:48
    
@Itali I think you are right. If you switch between several languages on one machine in a short time period it seems to stop working correctly. –  MVCylon Jul 24 '11 at 1:13
add comment

1 Answer 1

The question doesn't really make sense, functionally.
The translation widget is triggered by the act of changing from the default selection("Select Language") to the target language. Making the widget come up with a different item selected wouldn't accomplish anything. In fact, people would probably have to change the selection to something else, wait for that translation, and then change it back to get at the language you actually want. You could conceivably use a bit of Javascript to fake a change event on the drop-down after the page loads(I have not actually tested this), but then that'll make it happen for everybody, including people who don't want it.

If you always want to translate to the same language, maybe you should look at providing translation links instead. Assuming you're using a CMS of some kind, just go to the main Google Translate page, give it some URL/language combination and submit. You'll end up at something like this:

http://translate.google.com/translate?js=n&prev=_t&hl=en&ie=UTF-8&layout=2&eotf=1&sl=auto&tl=ja&u=http%3A%2F%2Fexample.com

...which is a link translating http://example.com from English to Japanese.
Then, in your CMS template, replace the value of the &u query parameter with the URL of the current page, URL-encoded.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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