Simple Machines Community Forum

Customizing SMF => SMF Coding Discussion => Topic started by: URPG on June 02, 2006, 06:52:58 AM

Title: URL/Site/Forum translation!
Post by: URPG on June 02, 2006, 06:52:58 AM
I have posted this before on bloczone since i wanted it for my SMF/TP but nobody seems to care there  :'( I still think it's a very good idea, so take a minute and read:

Web-translation services offer free text translation or translation of websites. You simply put the URL you want translated in there and they send you back a trnaslated page with an URL like www.translationservice.com/english-to-krautz/www.yoursite.com

I have seen on other Boards (vBulletin for example) and other Portals (MKPortal) Dropdown menues and Buttons to directly translate the Page you are viewing or completely switch the url so it stays translated while you browse. Since i did not want to copy+paste and call it my work, i did take a look at Babelfish Page, re-shaped the webform and now this code does translate the entire site:

Code (Translate Site html-block) Select
<form action="http://babelfish.altavista.com/babelfish/tr" method="post" onSubmit="return verifyTrURL()" name="frmTrURL">
      <input type="text" size="30" style="width:100" name="trurl" value="http://www.urpg.info" />
      <br><nobr><select name="lp" style="font-size:0.8em;" tabindex="1" class="button">
<option value="">Select from and to languages</option>
<option value="zh_en">Chinese-simp to English</option>
<option value="zt_en">Chinese-trad to English</option>
<option value="en_zh">English to Chinese-simp</option>
<option value="en_zt">English to Chinese-trad</option>
<option value="en_nl">English to Dutch</option>
<option value="en_fr">English to French</option>
<option value="en_de">English to German</option>
<option value="en_el">English to Greek</option>
<option value="en_it">English to Italian</option>
<option value="en_ja">English to Japanese</option>
<option value="en_ko">English to Korean</option>
<option value="en_pt">English to Portuguese</option>
<option value="en_ru">English to Russian</option>
<option value="en_es">English to Spanish</option>
<option value="nl_en">Dutch to English</option>
<option value="nl_fr">Dutch to French</option>
<option value="fr_en">French to English</option>
<option value="fr_de">French to German</option>
<option value="fr_el">French to Greek</option>
<option value="fr_it">French to Italian</option>
<option value="fr_pt">French to Portuguese</option>
<option value="fr_nl">French to Dutch</option>
<option value="fr_es">French to Spanish</option>
<option value="de_en">German to English</option>
<option value="de_fr">German to French</option>
<option value="el_en">Greek to English</option>
<option value="el_fr">Greek to French</option>
<option value="it_en">Italian to English</option>
<option value="it_fr">Italian to French</option>
<option value="ja_en">Japanese to English</option>
<option value="ko_en">Korean to English</option>
<option value="pt_en">Portuguese to English</option>
<option value="pt_fr">Portuguese to French</option>
<option value="ru_en">Russian to English</option>
<option value="es_en">Spanish to English</option>
<option value="es_fr">Spanish to French</option>
</select>
</nobr>
 
<input type="Submit" value="Translate" name="btnTrUrl">
</form>


Demo on my SMF/TP site, left side Block: http://www.urpg.info (http://www.urpg.info)

There is however one stupid thing occuring: You get the Page in a Frame with some advertisement showing and if you want to switch to another language again it messes the page completely up by trying to translate the already translated site.

We'd need to modify it so it does only send the original Web page, insert a "back to original" Link, a message "you are only viewing a translation" and maybe get rid of the frame thingy?

Sugestions? Help!
Title: Re: URL/Site/Forum translation!
Post by: URPG on August 05, 2006, 09:09:19 PM
Does nobody actualy think this is useful? Or do you guys already have some other freeware running?
Title: Re: URL/Site/Forum translation!
Post by: Witte on December 12, 2006, 04:43:05 AM
This is very useful, however, I just get logged out when I try to use the translate, and it just defaults to the home page, not the page I was on...
Title: Re: URL/Site/Forum translation!
Post by: URPG on December 17, 2006, 07:33:21 AM
It should default to the page you called it up from...

As i said: It needs development, I'm not a computer science major and learned my coding skills back in the good old C64 days...

Anyone that could help?
Title: Re: URL/Site/Forum translation!
Post by: codenaught on December 17, 2006, 11:47:18 AM
As far as I know, there isn't much you can do in terms of editing that to how you want. It is a service and when that service is called upon, it uses its own code, not code from your forum.
Title: Re: URL/Site/Forum translation!
Post by: URPG on December 19, 2006, 06:29:56 AM
But we could tweak what side it calls in which way, etc... and i have seen other (vB) sites with a similar thing, also babel but no frame loaded, it just returns the translated site...