google-translate

Offline language translation API [closed]

一世执手 提交于 2019-11-29 03:38:11
Please note that I am aware that this question has appeared in various forms at several places, including stackoverflow, but I have yet to see a satisfying answer. There are several pretty solid language translation APIs out there (eg., Microsoft and Google ). They are HTTP RESTful APIs that work well for web or mobile applications, apps that operate in online mode. However, I am looking for a language translation API that can translate short (or long) sentences in offline mode, when no Internet connectivity is available. Another version of my question: Google Translate app comes with an

Can you style the google translate plugin?

和自甴很熟 提交于 2019-11-28 21:23:15
问题 I'm using this plugin (http://translate.google.com/translate_tools) to translate my website. The problem is that I can't figure out how to style it so it does not fit with the rest of the page. Any suggestions? 回答1: Sure you can style anything that renders out on your page. Here is a part of the rendered mark-up: <div id="google_translate_element"> <div class="skiptranslate goog-te-gadget" style=""> <div id=":1.targetLanguage"> <select class="goog-te-combo"> </select> </div> Powered by <span

Request to Google Text-To-Speech API [closed]

Deadly 提交于 2019-11-28 12:18:55
I have this URL: http://translate.google.com/translate_tts?ie=utf-8&tl=en&q=Hello+world When I put it to the address bar in a browser and hit enter, I get mp3 file with synthesized speech saying "Hello world". Everything is correct. But now I have a link in HTML that redirects to this URL, like this: <a href="http://translate.google.com/translate_tts?ie=utf-8&tl=en&q=Hello+world">Link</a> When I click this link, I don't get a file but an error (simple QuickTime logo). Could anyone explain me why is it so and how can I solve my problem? olivierlemasle The explanation is that Google restricts

Translating using Google Translate API

梦想的初衷 提交于 2019-11-28 11:35:24
问题 I want to use the following code as the basis for a program that translates user input to English. I am getting the error "cannot find symbol - GoogleApi." Can someone please help me figure out what to do? import com.google.api.translate.Language; import com.google.api.translate.Translate; public class Main { public static void main(String[] args) throws Exception { // Set the HTTP referrer to your website address. GoogleAPI.setHttpReferrer(/* Enter the URL of your site here */); // Set the

JavaScript/jQuery - Get text and translate it

只谈情不闲聊 提交于 2019-11-28 11:33:15
Is it possible to use jQuery to get a text from an element and translate it to other languages? Before <p>Hello</p> After <p>bonjour</p> Use Google translation API. Easy to use. The following translates Spanish to English. To translate from and to other languages, simply change 'es' and 'en' <div id="content"></div> google.load("language", "1"); function initialize() { var content = document.getElementById('content'); content.innerHTML = '<div id="text">Hola, me alegro mucho de verte.<\/div><div id="translation"/>'; var text = document.getElementById("text").innerHTML; google.language

Google Cloud Translation API The request is missing a valid API key

懵懂的女人 提交于 2019-11-28 11:13:47
问题 I'm trying to use the Google Cloud Translation API in my application but whenever I try to translate something it comes up with this missing valid API error. I've done the quickstart steps and that didn't work. https://cloud.google.com/translate/docs/quickstart I've tried the steps in the client library authentication and that hasn't worked. https://cloud.google.com/translate/docs/reference/libraries E/AndroidRuntime: FATAL EXCEPTION: main Process: herrsa1.bit.translator, PID: 16598 com

Issue with Google Translation on Website?

时光总嘲笑我的痴心妄想 提交于 2019-11-28 09:31:49
问题 So I am using the google translate tool for my website- I am setting it up via: https://translate.google.com/manager/website Under display mode, I keep choosing automatic but it looks like the banner ALWAYS displays even though they state it will ONLY show if the browser is not the language of the site (which is EN) What's going on? Is their tool broken? is there a way to use this tool to just show if the language is not en? 回答1: Paste the code below on your website. Languages mentioned in

Python Google Translate API error

*爱你&永不变心* 提交于 2019-11-28 08:59:27
问题 I am very to new to python and trying to translate a bunch of keywords using google API. I have an excel file with 3000 keywords which are mix of english, spanish, german etc. Trying to translate everything to English. However, every time I run my code, I get error at different values. Sometimes, my code give error at 810th keyword while sometime it gives error at 1038 keyword. And I am not even editing the layout of the file. JSONDecodeError: Expecting value: line 1 column 1 (char 0) Below

Playing remote audio (from Google Translate) in HTML5 on a server

为君一笑 提交于 2019-11-28 07:26:05
问题 I'm trying to use text-to-speech on a website using HTML5 and Google Translate. Getting speech from Google is as easy as a GET request to: http://translate.google.com/translate_tts?tl=en&q=hello In order to play that file I'm using the audio-tag: <audio id="speech" src="http://translate.google.com/translate_tts?tl=en&q=hello" controls="controls" autoplay="autoplay">Your browser does not support the audio element.</audio> That works perfectly when I try to open the html file locally using

Google Website Translator Automatic Display Mode

本秂侑毒 提交于 2019-11-28 07:16:18
问题 I'm trying to include google website translator on my website. I want to use the automatic thing so the bar shows up if your browser language is different to the page language. Every time I select the automatic Display mode the code it gives me is for 'tabbed'. Can anybody tell me what i'm doing wrong or provide the right code? Thanks in advance. EDIT: <div id="google_translate_element"></div> <script type="text/javascript"> function googleTranslateElementInit() { new google.translate