RSS

YandexTranslator translation of text strings

19 May

You can now translate text between languages using the YandexTranslator component. You can also use the TextToSpeech to have it spoken in the translated language.

For example, you can have a sentence translated from English to French and have it spoken in French using the TextToSpeech. The blocks below show how you can accomplish this translation service. The first block translates from English (en) to French (fre). Once the translation service is invoked, the GotTranslation block will be invoked. In that block, the language and country codes are setup and we then use the TextToSpeech component to speak the translation.

image

NOTE for AppyBuilder:


 

If you are using AppyBuilder, you’ll have to request an API key from Yandex HERE and. You will also note that for this platform, there is a property and blocks for specifying the key. If the key is not used, then translation will not go through and you will receive an error during translation. To specify key, use the property or the blocks like below:

image
Mobile App Development

 
23 Comments

Posted by on May 19, 2014 in Uncategorized

 

23 responses to “YandexTranslator translation of text strings

  1. M Mounib Mekhilef

    June 18, 2018 at 6:59 am

    Hi Hossein.
    Thanks for your work.
    My question is related to multiple translations.
    Consider having let’s say 5 phrases to translate separately (because the translations will displayed in different areas). if you request the Yandex translation for each phrase, the order in which the answers are delivered is not always the same (the first in, is not necessarily the first out). Any idea about how to handle that ?

     
  2. Guillermo Verdun

    October 20, 2017 at 1:08 pm

    a mi me sale este error
    “Error 2201: Missing clave de API para el servicio Yandex.Translate.”

     
  3. GBNeil

    January 7, 2015 at 12:28 pm

    Thanks firstly for all the great work. Just playing with Ai2LiveComplete v. 14.12.16. I’ve got a Yandex API key & entered it in the property field, but am stuck on how to get this into the set propery. I’m certain this is simple but I’m stuck! Any help would be appreciated!

     
  4. Ron Barak

    December 18, 2014 at 3:26 pm

    My App Inventor 2 does not show an entry for YandexTranslator in its Palette (see https://drive.google.com/file/d/0Bw5McUt95YdeVEJoSm5MNjJvMmc/view?usp=sharing).
    Is there a way to get YandexTranslator to show in my AI2’s Palette?

     
    • Hossein Amerkashi

      December 18, 2014 at 3:30 pm

      Its under Media category
      Check-out our Ai2LiveComplete HERE; an App Inventor on Steroid!

       
  5. Kenigbolo Meya Stephen

    June 30, 2014 at 9:48 pm

    Hossein……. I am working with the offline version and I have two buttons on my app which has the france flag and the england flag. I want to use it such that if a user clicks on the france flag, all text in the screen would turn to french rather than english and it would return back to Engish when the england flag is clicked

     
    • M. Hossein Amerkashi

      July 3, 2014 at 9:24 am

      Using AI, there is no easy way. You’ll have to maintain 2 different lists that contain your language data. Once user clicks on a flag, then somehow you’ll have to read from the list language-data and set into your components

       
  6. Sylwester Borek

    June 27, 2014 at 6:31 am

    I use AI2 online version and I can’t find properities Yandex_API_Key

     
    • M. Hossein Amerkashi

      June 27, 2014 at 9:14 am

      The MIT online version does not include the API key. The key will be used for the offline version. Will PM you

       
  7. cob187

    May 30, 2014 at 12:29 am

    Hi, I used the blocks in the same way as you showed above and I’m a bit confused on how I should get the – “call YandexTranslate1” to work properly. I tried putting that into a button but when I do, the whole screen goes blank in the emulator.

    I am using the online App Inventor 2.

    Cheers.

     
    • M. Hossein Amerkashi

      May 30, 2014 at 6:49 am

      If you put a link to your source (.aia file), me or someone here will be able to check into it

       
      • cob187

        May 30, 2014 at 8:15 am

        Hi,

        I pretty much just copied everything exactly as you showed above but I am a novice at this and tried putting the – “call YandexTranslate1″ inside a button just to see if I can get it to work but I just got a blank screen.

        Exactly what you see above in the image I did plus that yandex call was put inside a button, nothing else. I’m probably missing something very simple?

        Cheers.

         
  8. kristijan per (Terminator)

    May 26, 2014 at 1:15 pm

    I have error 2201 Missing API key for the Yandex.Translate service.

     
  9. Alfredo Martinez

    May 19, 2014 at 6:24 pm

    Where can I find this component Hossein?

     

Leave a reply to Ron Barak Cancel reply