

end = time.asctime( time.localtime(time.time()) ) To overcome this Hippy Jim suggested using the current time and addign it to the tweet so that each one was unique. I also had the issue that when the error message was sent, if it sent another error message then Twitter thought the Translation Bot was spamming accounts.

This may be because the Unicode cannot be converted to a string especially with characters like the beautiful umlaut! The errors handling section took a few attempts to fix mainly because of the str / tuple argument which kept crashing the program. However, 1) I can only add one of those but I need one for three different languages 2) it auto translates all test. You can use the translation service of by simply adding bot to your Skype and Telegram contacts. If the phrase cannot be converted then a error message is sent back to the person who sent the original tweet. A command-based bot, you can get translations with it using commands such as /translateto, /translatethis, or /autotranslate.
#FRENCH TRANSLATE BOT CODE#
Now you have the phrase that needs translating, this can then be imported into the translation code in step 2. Pulls out the phrase and then saves it as a variable called final_message_to_translate. This line,įinal_message_to_translate = tweet_to_check Next, it checks that the tweet contains the user ID if so then the this is the sign that the 'phrase' is going to be translated into another language, currently French.ĭoes_the_tweet_contain_key_word = code lineĮnd_of_key_phrase = tweet_to_check.find(" ")Ĭhecks for the space after the which means the 'phrase' to translate is next, after the space. In the program the first line takes each single tweet, If you do not require the Twitter codes then read on else, pop over to the Twitter Setup Tutorial. A bot to help you find translation of various languages. In this project, post with a picture or just text. Here you will find Best Telegram Bots to translate the text from one language to other. This hacks requires you to have a Twitter Authorisation for the API set up which enables you to stream tweets, grab users names and post back to the timeline. LINE Translator bot translates English, Chinese, Thai, Japanese, Spanish, French, Italian, German, Korean, Vietnamese, Turkish, Portuguese, Indonesian, Hindi, Punjabi, Bengali, Russian, Serbian, Arabic, Polish, Greek and many more.
