Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Google Translator


vicster

Recommended Posts

I installed the v1.45 of Google Translator and everything works fine, but the little flag images don't show - I just have a bunch of little boxes with the dreaded red 'X' inside the infobox.

 

Can anyone help? Is it the javascript?

 

I have STS installed.

 

Here's the code:

 

?>
<!-- languages //-->
         <tr>
           <td>
<?php   
 $info_box_contents = array();
 $info_box_contents[] = array('text' => BOX_HEADING_LANGUAGES);

 new infoBoxHeading($info_box_contents, false, false);

 $info_box_contents = array();

 $fromLang = "el";
 $originalPage = HTTP_SERVER .$_SERVER['REQUEST_URI'];

 if(isset($_GET['hl'])) {
   $fromLang = $_GET['hl'];
$originalPage = $_GET['u'];
 }

 $info_box_contents[] = array('align' => 'center','text' => '<a onclick="java script:top.location = \'http://translate.google.com/translate?u='.$originalPage.'&langpair='.$fromLang.'&hl=en\';" href="java script:;"><img src="../../images/languages/english.gif" ALT="English"  border="0"></a> ' .
                                                            '<a onclick="java script:top.location = \'http://translate.google.com/translate?u='.$originalPage.'&langpair='.$fromLang.'&hl=fr\';" href="java script:;"><img src="../../images/languages/french.gif" ALT="French"  border="0"></a> ' .
                                                            '<a onclick="java script:top.location = \'http://translate.google.com/translate?u='.$originalPage.'&langpair='.$fromLang.'&hl=es\';" href="java script:;"><img src="../../images/languages/spanish.gif"  ALT="Spanish"  border="0"></a><br>' .
                                                            '<a onclick="java script:top.location = \'http://translate.google.com/translate?u='.$originalPage.'&langpair='.$fromLang.'&hl=de\';" href="java script:;"><img src="../../images/languages/german.gif"  ALT="German"  border="0"></a> ' .
                                                            '<a onclick="java script:top.location = \'http://translate.google.com/translate?u='.$originalPage.'&langpair='.$fromLang.'&hl=it\';" href="java script:;"><img src="../../images/languages/italian.gif"  ALT="Italian" border="0"></a> ' .
                                                            '<a onclick="java script:top.location = \'http://translate.google.com/translate?u='.$originalPage.'&langpair='.$fromLang.'&hl=pt\';" href="java script:;"><img src="../../images/languages/portuguese.gif"  ALT="Portuguese" border="0"></a><br>' .
                                                            '<a onclick="java script:top.location = \'http://translate.google.com/translate?u='.$originalPage.'&langpair='.$fromLang.'&hl=ko\';" href="java script:;"><img src="../../images/languages/korea.gif"  ALT="Korean" border="0"></a> ' .
                                                            '<a onclick="java script:top.location = \'http://translate.google.com/translate?u='.$originalPage.'&langpair='.$fromLang.'&hl=ja\';" href="java script:;"><img src="../../images/languages/japan.gif"  ALT="Japanese" border="0"></a> ' .
														 '<a onclick="java script:top.location = \'http://translate.google.com/translate?u='.$originalPage.'&langpair='.$fromLang.'&hl=ar\';" href="java script:;"><img src="../../images/languages/arabic.gif"  ALT="Arabic" border="0"></a>');
 new infoBox($info_box_contents);
?>
           </td>
         </tr>
<!-- languages_eof //-->

Link to comment
Share on other sites

  • 1 year later...

you should have an image folder called languages on your downloaded contribution file. upload that languages folder to www.yoursite.com/images

 

ignore the fact that it might not be in the same directory as the cart files

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...