WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. infomix
    Member
    Posted 2 years 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 2 years 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
    Plugin Author

    Posted 2 years ago #

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

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic