does anyone know about this issue?

On 3月14日, 下午12時02分, LiangKuo wrote:
> I want to control the translation function for my page and depand on
> different sub-domain.
>
> so I set the value of cookie , googtrans,  since the toolbar load the
> value, it translate page automaticly.
>
> it works in firefox and ie, but does not in chrome ( any of version )
>
> does anyone know about this issue?
>
> here is my code for your information:
>
> var googleTranslateElementInit = function () {
>         var lang = window.location.href.split('/');
>         lang = lang[2].split('.');
>         lang = lang[0];
>         if(lang === "en"){
>           document.cookie="googtrans=/zh-CN/en; domain=mydomain;
> path=/;";
>     new google.translate.TranslateElement({
>               pageLanguage: 'zh-CN',
>               includedLanguages: 'en',
>               layout: google.translate.TranslateElement.InlineLayout.SIMPLE
>           }, 'google_translate_element');
>         }else if(lang === "cn"){
>           document.cookie="googtrans=/en/zh-CN; domain=mydomain;
> path=/;";
>     new google.translate.TranslateElement({
>               pageLanguage: 'en',
>               includedLanguages: 'zh-CN',
>               layout: google.translate.TranslateElement.InlineLayout.SIMPLE
>           }, 'google_translate_element');
>         }else{
>             /// don't translate anything
>         }
>
>
>
>
>
>
>
> };

-- 
You received this message because you are subscribed to the Google Groups 
"General" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-translate-general?hl=en.

Reply via email to