Jump to content
Sign in to follow this  
azer

babelfish infobox

Recommended Posts

Thanks for the info, but now I just want to leave the flags on there.

 

But the text is the link, not the flags. Would you (or anybody else) know how to link up the flags to Bablefish?

 

Also how do I get the flags to line up against each other? And not in a grid as they are now set out.

 

Thanks,

Pompeylad.

Maybe if you played with something like

<td><a href="http://babelfish.altavista.com/babelfish/tr?doit=done&url='. HTTP_SERVER .'&lp=en_de"><img src="images/languages/german.gif" border="0"></a></td>

 

Not sure what you mean by line up against each other. If you want them horizontal, just use one <tr> at the start and one </tr> at the end.


The Coopco Underwear Shop

 

If you live to be 100 years of age, that means you have lived for 36,525 days. Don't waste another, there aren't many left.

Share this post


Link to post
Share on other sites

<!-- languages //-->
	<tr>
           <td>

<?php
$Babellink = "http://babelfish.altavista.com/babelfish/tr?doit=done&url=";
$MainURL = $_SERVER["HTTP_HOST"];
$URLlink = $_SERVER["REQUEST_URI"];
$LINKext = "&lp=en_";

 $info_box_contents = array();
 $info_box_contents[] = array('text' => 'Babelfish Translation');

 new infoBoxHeading($info_box_contents, false, false);

 $info_box_contents = array();
 $info_box_contents[] = array('text' => '

<!-- BEGIN ALL EDITING -->
<table width="100" border="0">
 <tr>
   <tr><script type="text/javascript">
//<![CDATA[
document.write("<a style=\"color:#000000;font-weight:normal;\" target=\"_top\" href=\"'.$URLlink.'\">English</a>");
document.close();
//]]>
</script></tr>
   <tr><img src="images/languages/english.gif" width="18" height="12" alt="English" border="1"></tr>
 </tr><tr>
   <tr><script type="text/javascript">
//<![CDATA[
document.write("<a style=\"color:#000000;font-weight:normal;\" target=\"_top\" href=\"'.$Babellink.$MainURL.$URLlink.$LINKext.'zh\"><img src=\"images/languages/chinese_L.gif\" width=\"24\" height=\"11\" border=\"0\" alt=\"Chinese\" /></a>");
document.close();
//]]>
</script></tr>
   <tr><img src="images/languages/chinese.gif" width="18" height="12" alt="Chinese" border="1"></tr>
 </tr><tr>
   <tr><script type="text/javascript">
//<![CDATA[
document.write("<a style=\"color:#000000;font-weight:normal;\" target=\"_top\" href=\"'.$Babellink.$MainURL.$URLlink.$LINKext.'fr\">Français</a>");
document.close();
//]]>
</script></tr>
   <tr><img src="images/languages/french.gif" width="18" height="12" alt="French" border="1"></tr>
 </tr><tr>
   <tr><script type="text/javascript">
//<![CDATA[
document.write("<a style=\"color:#000000;font-weight:normal;\" target=\"_top\" href=\"'.$Babellink.$MainURL.$URLlink.$LINKext.'nl\">Nederlands</a>");
document.close();
//]]>
</script></tr>
   <tr><img src="images/languages/dutch.gif" width="20" height="14" alt="Dutch" border="0"></tr>
 </tr><tr>
   <tr><script type="text/javascript">
//<![CDATA[
document.write("<a style=\"color:#000000;font-weight:normal;\" target=\"_top\" href=\"'.$Babellink.$MainURL.$URLlink.$LINKext.'de\">Deutsch</a>");
document.close();
//]]>
</script></tr>
   <tr><img src="images/languages/german.gif" width="18" height="12" alt="German" border="1"></tr>
 </tr><tr>
   <tr><script type="text/javascript">
//<![CDATA[
document.write("<a style=\"color:#000000;font-weight:normal;\" target=\"_top\" href=\"'.$Babellink.$MainURL.$URLlink.$LINKext.'el\">Ελληνικα</a>");
document.close();
//]]>
</script></tr>
   <tr><img src="images/languages/greek.gif" width="20" height="14" alt="Greek" border="0"></tr>
 </tr><tr>
   <tr><script type="text/javascript">
//<![CDATA[
document.write("<a style=\"color:#000000;font-weight:normal;\" target=\"_top\" href=\"'.$Babellink.$MainURL.$URLlink.$LINKext.'it\">Italiano</a>");
document.close();
//]]>
</script></tr>
   <tr><img src="images/languages/italian.gif" width="18" height="12" alt="Italian" border="1"></tr>
 </tr><tr>
   <tr><script type="text/javascript">
//<![CDATA[
document.write("<a style=\"color:#000000;font-weight:normal;\" target=\"_top\" href=\"'.$Babellink.$MainURL.$URLlink.$LINKext.'ja\"><img src=\"images/languages/japanese_L.gif\" width=\"36\" height=\"11\" border=\"0\" alt=\"Japanese\" /></a>");
document.close();
//]]>
</script></tr>
   <tr><img src="images/languages/japanese.gif" width="18" height="12" alt="Japanese" border="1"></tr>
 </tr><tr>
   <tr><script type="text/javascript">
//<![CDATA[
document.write("<a style=\"color:#000000;font-weight:normal;\" target=\"_top\" href=\"'.$Babellink.$MainURL.$URLlink.$LINKext.'ko\"><img src=\"images/languages/korean_L.gif\" width=\"36\" height=\"12\" border=\"0\" alt=\"Korean\" /></a>");
document.close();
//]]>
</script></tr>
   <tr><img src="images/languages/korean.gif" width="18" height="12" alt="Korean" border="1"></tr>
 </tr><tr>
   <tr><script type="text/javascript">
//<![CDATA[
document.write("<a style=\"color:#000000;font-weight:normal;\" target=\"_top\" href=\"'.$Babellink.$MainURL.$URLlink.$LINKext.'pt\">Portuguese</a>");
document.close();
//]]>
</script></tr>
   <tr><img src="images/languages/portuguese.gif" width="18" height="12" alt="Portuguese" border="1"></tr>
 </tr><tr>
   <tr><script type="text/javascript">
//<![CDATA[
document.write("<a style=\"color:#000000;font-weight:normal;\" target=\"_top\" href=\"'.$Babellink.$MainURL.$URLlink.$LINKext.'ru\">Pyccko</a>");
document.close();
//]]>
</script></tr>
   <tr><img src="images/languages/russian.gif" width="20" height="14" alt="Russian" border="0"></tr>
 </tr><tr>
   <tr><script type="text/javascript">
//<![CDATA[
document.write("<a style=\"color:#000000;font-weight:normal;\" target=\"_top\" href=\"'.$Babellink.$MainURL.$URLlink.$LINKext.'es\">Español</a>");
document.close();
//]]>
</script></tr>
   <tr><img src="images/languages/spanish.gif" width="18" height="12" alt="Spanish" border="1"></tr>
 </tr>
</table>

<!-- FINISH ALL EDITING -->

');

 new infoBox($info_box_contents);
?>
		</td>
     	</tr>
<!-- languages_eof //--> 

 

Hi,

 

Does anybody know how to link up the <a href="http://babelfish.altavista.com/babelfish/tr?doit=done&url='. HTTP_SERVER .'&lp=en_de"> to the flags and remove the text?

 

Thanks,

Pompeylad.


PHP?!? Long live HTML!!!! But then again we never stop learning.

Share this post


Link to post
Share on other sites
Thanks Les,

 

Now all I have to do find out how to link up the <a href="http://babelfish.altavista.com/babelfish/tr?doit=done&url='. HTTP_SERVER .'&lp=en_de"> to the flags, not the text.

 

Thank You Again,

Pompeylad.

I thought that is what I did.


The Coopco Underwear Shop

 

If you live to be 100 years of age, that means you have lived for 36,525 days. Don't waste another, there aren't many left.

Share this post


Link to post
Share on other sites

Hi Les,

 

You told me to change the '<td>' to '<tr>', which line up the text and flags horizontally. This has been a great help and I am very greatful for this. But you or nobody else has told me to how to link up the flags, not the text.

 

I have tried many ways so far, but nothing works.

 

Pompeylad.


PHP?!? Long live HTML!!!! But then again we never stop learning.

Share this post


Link to post
Share on other sites
<!-- languages //-->
	<tr>
           <td>

<?php
$Babellink = "http://babelfish.altavista.com/babelfish/tr?doit=done&url=";
$MainURL = $_SERVER["HTTP_HOST"];
$URLlink = $_SERVER["REQUEST_URI"];
$LINKext = "&lp=en_";

 $info_box_contents = array();
 $info_box_contents[] = array('text' => 'Babelfish Translation');

 new infoBoxHeading($info_box_contents, false, false);

 $info_box_contents = array();
 $info_box_contents[] = array('text' => '

<!-- BEGIN ALL EDITING -->
<table width="100" border="0">
 <tr>
   <tr><script type="text/javascript">
//<![CDATA[
document.write("<a style=\"color:#000000;font-weight:normal;\" target=\"_top\" href=\"'.$URLlink.'\">English</a>");
document.close();
//]]>
</script></tr>
   <tr><img src="images/languages/english.gif" width="18" height="12" alt="English" border="1"></tr>
 </tr><tr>
   <tr><script type="text/javascript">
//<![CDATA[
document.write("<a style=\"color:#000000;font-weight:normal;\" target=\"_top\" href=\"'.$Babellink.$MainURL.$URLlink.$LINKext.'zh\"><img src=\"images/languages/chinese_L.gif\" width=\"24\" height=\"11\" border=\"0\" alt=\"Chinese\" /></a>");
document.close();
//]]>
</script></tr>
   <tr><img src="images/languages/chinese.gif" width="18" height="12" alt="Chinese" border="1"></tr>
 </tr><tr>
   <tr><script type="text/javascript">
//<![CDATA[
document.write("<a style=\"color:#000000;font-weight:normal;\" target=\"_top\" href=\"'.$Babellink.$MainURL.$URLlink.$LINKext.'fr\">Français</a>");
document.close();
//]]>
</script></tr>
   <tr><img src="images/languages/french.gif" width="18" height="12" alt="French" border="1"></tr>
 </tr><tr>
   <tr><script type="text/javascript">
//<![CDATA[
document.write("<a style=\"color:#000000;font-weight:normal;\" target=\"_top\" href=\"'.$Babellink.$MainURL.$URLlink.$LINKext.'nl\">Nederlands</a>");
document.close();
//]]>
</script></tr>
   <tr><img src="images/languages/dutch.gif" width="20" height="14" alt="Dutch" border="0"></tr>
 </tr><tr>
   <tr><script type="text/javascript">
//<![CDATA[
document.write("<a style=\"color:#000000;font-weight:normal;\" target=\"_top\" href=\"'.$Babellink.$MainURL.$URLlink.$LINKext.'de\">Deutsch</a>");
document.close();
//]]>
</script></tr>
   <tr><img src="images/languages/german.gif" width="18" height="12" alt="German" border="1"></tr>
 </tr><tr>
   <tr><script type="text/javascript">
//<![CDATA[
document.write("<a style=\"color:#000000;font-weight:normal;\" target=\"_top\" href=\"'.$Babellink.$MainURL.$URLlink.$LINKext.'el\">Ελληνικα</a>");
document.close();
//]]>
</script></tr>
   <tr><img src="images/languages/greek.gif" width="20" height="14" alt="Greek" border="0"></tr>
 </tr><tr>
   <tr><script type="text/javascript">
//<![CDATA[
document.write("<a style=\"color:#000000;font-weight:normal;\" target=\"_top\" href=\"'.$Babellink.$MainURL.$URLlink.$LINKext.'it\">Italiano</a>");
document.close();
//]]>
</script></tr>
   <tr><img src="images/languages/italian.gif" width="18" height="12" alt="Italian" border="1"></tr>
 </tr><tr>
   <tr><script type="text/javascript">
//<![CDATA[
document.write("<a style=\"color:#000000;font-weight:normal;\" target=\"_top\" href=\"'.$Babellink.$MainURL.$URLlink.$LINKext.'ja\"><img src=\"images/languages/japanese_L.gif\" width=\"36\" height=\"11\" border=\"0\" alt=\"Japanese\" /></a>");
document.close();
//]]>
</script></tr>
   <tr><img src="images/languages/japanese.gif" width="18" height="12" alt="Japanese" border="1"></tr>
 </tr><tr>
   <tr><script type="text/javascript">
//<![CDATA[
document.write("<a style=\"color:#000000;font-weight:normal;\" target=\"_top\" href=\"'.$Babellink.$MainURL.$URLlink.$LINKext.'ko\"><img src=\"images/languages/korean_L.gif\" width=\"36\" height=\"12\" border=\"0\" alt=\"Korean\" /></a>");
document.close();
//]]>
</script></tr>
   <tr><img src="images/languages/korean.gif" width="18" height="12" alt="Korean" border="1"></tr>
 </tr><tr>
   <tr><script type="text/javascript">
//<![CDATA[
document.write("<a style=\"color:#000000;font-weight:normal;\" target=\"_top\" href=\"'.$Babellink.$MainURL.$URLlink.$LINKext.'pt\">Portuguese</a>");
document.close();
//]]>
</script></tr>
   <tr><img src="images/languages/portuguese.gif" width="18" height="12" alt="Portuguese" border="1"></tr>
 </tr><tr>
   <tr><script type="text/javascript">
//<![CDATA[
document.write("<a style=\"color:#000000;font-weight:normal;\" target=\"_top\" href=\"'.$Babellink.$MainURL.$URLlink.$LINKext.'ru\">Pyccko</a>");
document.close();
//]]>
</script></tr>
   <tr><img src="images/languages/russian.gif" width="20" height="14" alt="Russian" border="0"></tr>
 </tr><tr>
   <tr><script type="text/javascript">
//<![CDATA[
document.write("<a style=\"color:#000000;font-weight:normal;\" target=\"_top\" href=\"'.$Babellink.$MainURL.$URLlink.$LINKext.'es\">Español</a>");
document.close();
//]]>
</script></tr>
   <tr><img src="images/languages/spanish.gif" width="18" height="12" alt="Spanish" border="1"></tr>
 </tr>
</table>

<!-- FINISH ALL EDITING -->

');

 new infoBox($info_box_contents);
?>
		</td>
     	</tr>
<!-- languages_eof //--> 

 

Hi,

 

Does anybody know how to link up the <a href="http://babelfish.altavista.com/babelfish/tr?doit=done&url='. HTTP_SERVER .'&lp=en_de"> to the flags and remove the text?

 

Thanks,

Pompeylad.

 

 

Sorry, I been away from the PC due to haing a baby over the weekend. I'll have to get a few and write up your code to have only the flags clickable.

 

Sorry!

 

joe

Share this post


Link to post
Share on other sites

Hi Joe,

 

Congratulations on the birth of your child.

 

It will be a great help if you can find a few minutes to sort the script out, but first things first there is a little person that needs you.

 

Pompeylad.


PHP?!? Long live HTML!!!! But then again we never stop learning.

Share this post


Link to post
Share on other sites
Hi Joe,

 

Congratulations on the birth of your child.

 

It will be a great help if you can find a few minutes to sort the script out, but first things first there is a little person that needs you.

 

Pompeylad.

 

Why thank you, I am now back at work and in the next day or 2 I will get this around and fix it up for you. I'll then upload it and let you know when and where.

 

Joe

Share this post


Link to post
Share on other sites
Why thank you, I am now back at work and in the next day or 2 I will get this around and fix it up for you. I'll then upload it and let you know when and where.

 

Joe

 

Joe,

 

Thank you.

 

Thanks,

Pompeylad.


PHP?!? Long live HTML!!!! But then again we never stop learning.

Share this post


Link to post
Share on other sites
Joe,

 

Thank you.

 

Thanks,

Pompeylad.

 

OK All does, it is in the same area. Keep in mind this is calling the default language English.

 

Joe

Share this post


Link to post
Share on other sites

Hi All,

 

Installed the Babel fish Infobox and found it really usually. However, i can't login after translate to any language, any solution on this problem? Thanks!

 

Gismostation.com

Share this post


Link to post
Share on other sites

Can anyone help with a minor problem that I am having regarding this contribution. After the URL is passed to Babelfish, it takes me to the Babelfish homepage (http://uk.babelfish.yahoo.com/translate_url) rather than returning to the site.

 

After trying to translate the page at "http://www.sheffield-cutlery.com/cutlery/catalog/index.php" into French the results page is

 

"http://uk.babelfish.yahoo.com/translate_url?doit=done&url=www.sheffield-cutlery.com/cutlery/catalog/index.php/osCsid-d38ae1992b6e76c326f7fc4c53a34145&lp=en_fr".

 

It looks as if the server type is not being sent (http:// or https://) as if I manually add http:// it ends up in the right place with the page translated into whichever language is selected.

 

An extract from catalog/includes/boxes/Babelfish-Languages.php is as follows:

 


<!-- languages //-->
	<tr>
           <td>

<?php
$Babellink = "http://babelfish.altavista.com/babelfish/tr?doit=done&url=";
$MainURL = $_SERVER["HTTP_HOST"];
$URLlink = $_SERVER["REQUEST_URI"];
$LINKext = "&lp=en_";  # Edit this from en to what ever your original language reference is.

 $info_box_contents = array();
 $info_box_contents[] = array('text' => 'Languages');

 new infoBoxHeading($info_box_contents, false, false);

 $info_box_contents = array();
 $info_box_contents[] = array('text' => '

<!-- BEGIN ALL EDITING -->
<table width="175" border="0">
 <tr>
   <td><script type="text/javascript">
//<![CDATA[
document.write("<a style=\"color:#000000;font-weight:normal;\" target=\"_top\" href=\"'.$URLlink.'\"><img src=\"images/languages/english.gif\" width=\"18\" height=\"12\" border=\"1\" alt=\"English\"></a>");
document.close();
//]]>
</script></td>
   <td><script type="text/javascript">
//<![CDATA[
document.write("<a style=\"color:#000000;font-weight:normal;\" target=\"_top\" href=\"'.$Babellink.$MainURL.$URLlink.$LINKext.'zh\"><img src=\"images/languages/chinese.gif\" width=\"18\" height=\"12\" border=\"1\" alt=\"Chinese\" /></a>");
document.close();
//]]>
</script></td>

.. <some other languages> ..

 </tr>
</table>

<!-- FINISH ALL EDITING -->

');

 new infoBox($info_box_contents);
?>
		</td>
     	</tr>
<!-- languages_eof //--> 

 

I can add "http://" to the end of the Babellink definition but then the secure pages will not translate. It needs to translate both secure and non-secure pages.

 

 

Can someone help please.

Share this post


Link to post
Share on other sites

Hi

When i click on a flag to translate my site all it dose is take me to the babelfish home page..

 

anyone know whats wrong or how to fix

 

Thanks

Share this post


Link to post
Share on other sites

I had this module installed a long time ago. It is very hand for customers who have customers outside the US but don't want to hassle with making the multiple language files and modules work.

 

The BIGGEST PROBLEM is that like many contributions that use IMG tags our data feeds from other websites when you go into secure mode (HTTPS) a warning is displayed. I noticed this is with Babelfish, Google Ads, Live Chat ect. The only solution I know of is to dis-able these boxes when you enter a https section, in this case it would negate the purpose of Bablefish because customers would ultimately have to be able to read and process their orders in english.

 

Or the alternative is every customer who goes into a secure page gets a warning about how the SSL does not cover all content that is being displayed. To many people that is enough to stop them from buying anything.

Share this post


Link to post
Share on other sites
Hi

When i click on a flag to translate my site all it dose is take me to the babelfish home page..

 

anyone know whats wrong or how to fix

 

Thanks

V3.1 fixes it.


The Coopco Underwear Shop

 

If you live to be 100 years of age, that means you have lived for 36,525 days. Don't waste another, there aren't many left.

Share this post


Link to post
Share on other sites

Hello, does anyone know off hand why Babelfish (yahoo) is not picking up my doc type? Or better yet, once the translation takes place, I lose the doc type and as a result, my page is no longer centered but left justified. Hmm...

 

My doc type is:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"

"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

Edited by bkellum

Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Share this post


Link to post
Share on other sites
Hi All,

 

Installed the Babel fish Infobox. However, i can't login after translate to any language, any solution on this problem? Thanks!

 

Gismostation.com

 

I'm having the same issue here. I'll dig into it and post any resolutions.


Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Share this post


Link to post
Share on other sites

I'm having the same issue here. I'll dig into it and post any resolutions.

 

Did anyone ever find a fix for this, it's just what I need, but login, etc doesn't work with a translated page.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×