Author |
Topic  |
|
toniya
Starting Member
India
9 Posts |
Posted - 13 February 2010 : 05:55:36
|
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
|
I would recommend adding it into 'inc_header.asp' - immediately before 'sub sForumNavigation()', towards the bottom, should do the trick. |
 |
|
toniya
Starting Member
India
9 Posts |
Posted - 22 February 2010 : 03:29:35
|
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 |
 |
|
AnonJr
Moderator
    
United States
5768 Posts |
Posted - 22 February 2010 : 07:38:14
|
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.) |
 |
|
toniya
Starting Member
India
9 Posts |
Posted - 23 February 2010 : 04:44:02
|
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 |
 |
|
HuwR
Forum Admin
    
United Kingdom
20600 Posts |
Posted - 23 February 2010 : 05:21:51
|
okay, add the bits in red
" <td>" & vbNewLine %> insert your code here <% sub sForumNavigation()
|
 |
|
toniya
Starting Member
India
9 Posts |
Posted - 23 February 2010 : 16:04:17
|
Thanks a lot. It worked fine. Great job. Best regards, Toniya |
 |
|
|
Topic  |
|