PDA

View Full Version : Translation hack


Takara
04-27-2002, 12:36 AM
Hi There, I was wanting to add to my forum the Thread Translation box at the bottem, but the problem is I'm not sure how to display the entire URL (http://domain.com/forums/la.php?allinfohere), while converting ? to %2E / to %3E and = to %3D from within the styles page.

Can anyone give me a hand? This is what I have so far


<table cellpadding="0" cellspacing="0" border="0">
<tr><td>
<font face="verdana" size="1"><b>Translate Thread:</b><br>

<select name="lang" onchange="window.location=('http://fets3.freetranslation.com:5081/?Url=$HTTP_HOST$REQUEST_URI&Sequence=core&Language='+this.options[this.selectedIndex].value)">
<option value="-1" selected>Please select direction:</option>
<option value="English/Spanish">English to Spanish</option>
<option value="English/French">English to French</option>
<option value="English/German">English to German</option>
<option value="English/Italian">English to Italian</option>
<option value="English/Norwegian">English to Norwegian</option>
<option value="English/Portuguese">English to Portuguese</option>
<option value="Spanish/English">Spanish to English</option>
<option value="French/English">French to English</option>
<option value="German/English">German to English</option>
<option value="Italian/English">Italian to English</option>
<option value="Portuguese/English">Portuguese to English</option>
</select></font></td></tr></table>

Takara
04-27-2002, 07:07 PM
no one? -_-;

Slynderdale
05-11-2002, 07:11 PM
try

$formattedurl=str_replace("?","%2E",$HTTP_HOST$REQUEST_URI);
$formattedurl=str_replace("/","%3E",$formattedurl);
$formattedurl=str_replace("=","%3D",$formattedurl);