Activity Stream
48,167 MEMBERS
63267 ONLINE
besthostingforums On YouTube Subscribe to our Newsletter besthostingforums On Twitter besthostingforums On Facebook besthostingforums On facebook groups

Results 1 to 6 of 6
  1.     
    #1
    Member

    Default need translate script

    hi, i am searching for a translate script like http://www.microsofttranslator.com/
    it should use microsoft api, not google translate api.
    if u can offer me for free i'll be thank full
    or else my budget is 10 dollar with moneybookers only.
    peterpetroli Reviewed by peterpetroli on . need translate script hi, i am searching for a translate script like http://www.microsofttranslator.com/ it should use microsoft api, not google translate api. if u can offer me for free i'll be thank full :P or else my budget is 10 dollar with moneybookers only. Rating: 5

  2.   Sponsored Links

  3.     
    #2
    Respected Member
    Website's:
    DL4Everything.com Soft2050.in
    Microsoft already has a widget which you can place in your website to translate it quickly.


  4.     
    #3
    Too busy :|
    Website's:
    L337Fx.com BeastieBay.net
    Yeah, just try out the widget. Its pretty neat though

  5.     
    #4
    Member
    no i dont need something to translate my site, but i need a script with bing translate api to translate words and sentence. just like a dictionary.

  6.     
    #5
    Member
    Website's:
    tehMoviez.com 0Senes.com GeekFaceGames.com
    for what purpose? maybe that will give us a clearer idea

  7.     
    #6
    Member
    PHP Code: 
    <?php
    class Translator {
        
    // TRUE to enable print_r etc later on
        
    private $debugging false;
        
        public function 
    Translate($source_lang ""$source "Hello"$dest_lang "et") {
            
    // We generate some headers for the file_get_contents() function to make the request look more legit
            
    $headers stream_context_create(array("http" => array("method" => "GET""header" => "Accept-Charset: utf-8;q=0.7,*;q=0.3\r\nUser-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.63 Safari/535.7\r\nAccept: */*\r\nReferer: http://www.microsofttranslator.com/")));
            
    // We use a regular expression to extract the translated part from the response
            
    preg_match('!TranslatedText":"(.+?)","Tra!'file_get_contents("http://api.microsofttranslator.com/v2/ajax.svc/TranslateArray?appId=%22TNDJ9zfD_HXiAgFDKfCLz8fg92HEHFGOb93cdM6nxohI*%22&texts=[%22".urlencode($source)."%22]&from=%22".$source_lang."%22&to=%22".$dest_lang."%22&oncomplete=_mstc1&onerror=_mste1&loc=en&ctr=England&rgp=d18478d"null$headers), $translated);
            
    // In case we ever need to debug
            
    if($this->debugging)print_r($translated);
            
    // If the regular expression works like a charm, then return the translation, otherwise return false
            
    return (!empty($translated[1])) ? $translated[1] : false;
        }
        
    }
    // We use UTF-8 to avoid problems with tricky letters
    header("Content-type: text/html; charset=utf-8");
    // We initialise a new class
    $translator = new Translator;
    // We run the function that takes 3 arguments at most (leave the first one empty to use automatic detection)
    echo $translator->Translate("""Hey there, how are you?""es");

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Translate page
    By skinner in forum Web Development Area
    Replies: 1
    Last Post: 1st May 2012, 01:35 PM
  2. How to translate a template ?
    By Debaldus in forum DLE
    Replies: 9
    Last Post: 20th Feb 2012, 07:58 PM
  3. DLE translate tuto
    By milooot in forum Webmaster Discussion
    Replies: 3
    Last Post: 3rd Aug 2011, 05:23 PM
  4. Can someone translate this for me
    By kohkindachi in forum Technical Help Desk Support
    Replies: 2
    Last Post: 3rd Oct 2010, 01:34 PM
  5. How would you translate this in PHP ?
    By Porsche_maniak in forum Webmaster Discussion
    Replies: 33
    Last Post: 30th Apr 2010, 03:09 AM

Tags for this Thread

BE SOCIAL