Forums

Codestyling Localization
[resolved] active google translate v2 Api (3 posts)

  1. infomix
    Member
    Posted 4 months ago #

    I tried active google translate, i Have api key to v2 translate. But translate get error. How i can setup??? On .php is still old csp_fetch_remote_content(http://ajax.googleapis.com/ajax/services/language/translate?v=1.0&format=html&q=” v1 version translate,??

    http://wordpress.org/extend/plugins/codestyling-localization/

  2. safi2266
    Member
    Posted 3 months ago #

    Hi infomix
    after buying API Key I tried to replace the line

    $res = csp_fetch_remote_content("http://ajax.googleapis.com/ajax/services/language/translate?v=1.0&format=html&q=".urlencode($msgid)."&langpair=en%7C".$_POST['destlang']);

    with this one

    $res = csp_fetch_remote_content("https://www.googleapis.com/language/translate/v2?key=api_key_goes_here&q=".urlencode($msgid)."&source=en%26target=ar");

    according to this but the error message change to

    Sorry, Google Translation is not available

    I not code expert and hope to someone hlep us to fix this

    Regards,
    SaFi

  3. codestyling
    Member
    Posted 3 weeks ago #

    Has been implemented with version 1.99.17 and works now along with the additional Microsoft API as you want it.

Reply

You must log in to post.

About this Plugin

About this Topic