Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: General / Classic ASP versions(v3.4.XX)
 Google Translate - multilingual support
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

toniya
Starting Member

India
9 Posts

Posted - 13 February 2010 :  05:55:36  Show Profile  Send toniya a Yahoo! Message
Hello,

I want to add following code to provide multilingual support to users. Please advice how to incorporate this.:

<div id="google_translate_element"></div><script>
function googleTranslateElementInit() {
new google.translate.TranslateElement({
pageLanguage: 'en'
}, 'google_translate_element');
}
</script><script src="http://translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>

Thanks and best regards,
Toniya

Jezmeister
Senior Member

United Kingdom
1141 Posts

Posted - 21 February 2010 :  12:52:31  Show Profile  Visit Jezmeister's Homepage
I would recommend adding it into 'inc_header.asp' - immediately before 'sub sForumNavigation()', towards the bottom, should do the trick.
Go to Top of Page

toniya
Starting Member

India
9 Posts

Posted - 22 February 2010 :  03:29:35  Show Profile  Send toniya a Yahoo! Message
Is it OK?:

----------------------------------------------
" <td>" & vbNewLine
<div id="google_translate_element"></div><script>
function googleTranslateElementInit() {
new google.translate.TranslateElement({
pageLanguage: 'en'
}, 'google_translate_element');
}
</script><script src="http://translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>
sub sForumNavigation()
------------------------------------------------------------

But now website is not opening. I am getting this error:

-----------------------------------------------------
Microsoft VBScript compilation error '800a0400'

Expected statement

/inc_header.asp, line 429

<div id="google_translate_element"></div><script>
^
--------------------------------------------------------

Any solution?
Thanks and best regards,
Toniya
Go to Top of Page

AnonJr
Moderator

United States
5768 Posts

Posted - 22 February 2010 :  07:38:14  Show Profile  Visit AnonJr's Homepage
Look at some of the surrounding code and you'll see a few things like that you have to escape the double quotes(") by using two of them where you want one. For example, <div id="google_translate_element"> would become <div id=""google_translate_element"">.

Also, you'll need to enclose each line in quotes, and append the line continuation characters as appropriate. Look at the code above and below for an example, and if you're still having trouble post back with a little more context to your code. (as in 3 or 4 lines above and below the code you're trying to add.)
Go to Top of Page

toniya
Starting Member

India
9 Posts

Posted - 23 February 2010 :  04:44:02  Show Profile  Send toniya a Yahoo! Message
Hello,

I tried my best but no luck. I have to add this text:

<div id="google_translate_element"></div><script>
function googleTranslateElementInit() {
new google.translate.TranslateElement({
pageLanguage: 'en'
}, 'google_translate_element');
}
</script><script src="http://translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>

Between these 2 lines:

" <td>" & vbNewLine

sub sForumNavigation()


Please help.
Thanks and regards,
Toniya
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20600 Posts

Posted - 23 February 2010 :  05:21:51  Show Profile  Visit HuwR's Homepage
okay, add the bits in red

" <td>" & vbNewLine
%>
insert your code here
<%
sub sForumNavigation()
Go to Top of Page

toniya
Starting Member

India
9 Posts

Posted - 23 February 2010 :  16:04:17  Show Profile  Send toniya a Yahoo! Message
Thanks a lot. It worked fine. Great job.
Best regards,
Toniya
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.34 seconds. Powered By: Snitz Forums 2000 Version 3.4.07