Important: This page is using cookies (cookies). Using this website without turning off cookies in browser, means that you agree for using it.
Buy Now! Features Downloads

Earn with us!

If you would like to start earning money with vBET join to Affiliate Program.
Page 6 of 6 FirstFirst ... 456
Results 51 to 56 of 56

Thread: Google Translate API shut off or will be paid? Doesn't matter - vBET supports other APIs

  1. #51
    Michał Podbielski (vBET Staff) vBET's Avatar
    Join Date
    Oct 2009
    Posts
    3,037

    Default

    Reports are available only for Google Translation API v2. For v1 are not and this API will be closed December 1st 2011, so there is no sense to do anything in this area.

    At this moment language detection is supported only by Google Translation API (booth versions). We can add also support for Microsoft - we didn't do it yet, because we see some issues here. Microsoft Translation API supports less languages, so if you will have turned on more languages (those supported only by Google) then Microsoft translation API will be not able to detect the language. So in other words - we can add support for Microsoft Translation API language detection, but you can use it only when you use just languages supported for Microsoft. If you use one language more then Google must be used, otherwise detection will not work for languages not supported by Microsoft. This is the reason why we didn't add it from the beginning - it complicates configuration. Of course now we realize that many customers will stick only to free translations so we will add support for Microsoft Language Detection.

    There is no rush here - as long as Google Translation API v1 is working you can still have free language detection. So first we will go for new vBET3.x release and add there support for other translation API. Then we will ass support for Microsoft Language Detection.

    NOTE: at this moment in vBET4.x you can use Microsoft for translations and free Google Translation API v1 for detection. So you do not have to wait with switching. Language detection works separately - no matter what configuration you have for translation.

    Also please note that Microsoft Translation API is much younger so it evolves a lot. Google translations wasn't so good as now from the beginning. Anyway - vBET gives you a choice to use free or paid translations. We also would be very happy, if Google wouldn't change their API to paid one... What is important now - adopt!
    Last edited by vBET; 03-09-11 at 13:08. Reason: typo

  2. #52
    Senior Member
    Join Date
    Nov 2009
    Posts
    168

    Default

    Wow, looks like microsoft only supports 37 languages whereas google supports 53- is that correct?

    You are right that the microsoft API doesn't seem to be as refined as google's.

    Right now I am using the API as follows:

    http://api.microsofttranslator.com/V2/Ajax.svc/TranslateArray?appId=$key&from=$from&to=$to&maxTranslations=900&texts=["$text"]

    But if there is an encoded \n, \r or \t in the text, it seems the API yells at you. What's the safest way to encode $text? Right now I'm doing:

    str_ireplace(array('%0D','%0A','%09'),array('','',''),$translationURL);

    but that doesn't seem to be enough on top of the urlencode. Google's URL api was more elegant, as we didn't have to worry about quotes, either.

  3. #53
    Michał Podbielski (vBET Staff) vBET's Avatar
    Join Date
    Oct 2009
    Posts
    3,037

    Default

    You have vBulletin 4.x? vBET 4.x already supports Microsoft translation and you do not have to do any changes in code.
    vBET3.x will support it in next release. And indeed in Microsoft Translation API we have to cake care about some special characters - this is part of code form vBET4.x handling Microsoft Translation API:
    Code:
    $translationURL =& str_replace(array('%0A','%0D', '%09'),'',$translationURL);

  4. #54
    Senior Member
    Join Date
    Nov 2009
    Posts
    168

    Default

    No, I use 3.8 so I will have to wait and see

    Even with that replacement I am getting issues on text that contains quotes. However, for most pages, everything works.

    I hope microsoft adds support for more languages!

  5. #55
    Michał Podbielski (vBET Staff) vBET's Avatar
    Join Date
    Oct 2009
    Posts
    3,037

    Default

    Quote Originally Posted by moman View Post
    No, I use 3.8 so I will have to wait and see

    Even with that replacement I am getting issues on text that contains quotes. However, for most pages, everything works.

    I hope microsoft adds support for more languages!
    New vBET3.x release should be in this month In vBET4.x it is already working from some time, so bugs should be already solved. Anyway it will be released as beta version first, because of amount of changes.

  6. #56
    Senior Member
    Join Date
    Nov 2009
    Posts
    168

    Default

    Sounds good!

    For the time-being I seem to have fixed the issue with microsoft translator. It turned out that %22 (encoded quotes) in the URLs screwed things up so I am just removing them completely.

    For example,

    http://api.microsofttranslator.com/V2/Ajax.svc/TranslateArray?from=en&to=da&maxTranslations=900&texts=["Photo+%2329486+-+%22Broken+light%22"]&appId=

    Will complain about quotes, but

    http://api.microsofttranslator.com/V2/Ajax.svc/TranslateArray?from=en&to=da&maxTranslations=900&texts=["Photo+%2329486+-+Broken+light"]&appId=

    works fine

Page 6 of 6 FirstFirst ... 456

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •