- How do I tell Cloud Translation - Advanced to not translate something?
You can use the following HTML tags:
<span translate="no"> </span>
<span class="notranslate"> </span>
This functionality requires the source text to be submitted in HTML.
- Why was a
style
attribute added to the translated text withtext-align
anddirection
CSS properties? This occurs when you include HTML with the requested text to be translated, and you are translating from a right-to-left to a left-to-right language, or from a left-to-right to a right-to-left language. The translation includes the HTML
style
attribute with thetext-align
anddirection
CSS properties to ensure that the translated text is oriented in the proper direction. For example, translating<h2>Sample text</h2>
from English to Hebrew returns the following JSON:{ "data": { "translations": [ { "translatedText": "\u003ch2 style=\";text-align:right;direction:rtl\"\u003e טקסט לדוגמה (דברים) \u003c/h2\u003e" } ] } }
- I get an
HTTP 403
error when I call the API. - You may be exceeding your quota: either the daily billable total, or the
limit on characters per 100 seconds. The error message says
Daily Limit Exceeded
if you exceeded the daily limit orUser Rate Limit Exceeded
if you exceeded either of the "Characters per 100 seconds" quotas.To view or change usage limits for your project, or to request an increase to your quota, do the following:
- If you don't already have a billing account for your project, then create one.
- Visit the Enabled APIs page of the API library in the Cloud Console, and select an API from the list.
- To view and change quota-related settings, select Quotas. To view usage statistics, select Usage.
- I sometimes get
HTTP 500 (Internal Errors)
response from the API - This could happen if you submit text without the source language specified. If Google cannot determine the source language given the text (usually because the text is too short), we will return a 500. This situation can be fixed by specifying the source language explicitly.
- Can I specify multiple target languages in one request?
- You can supply up to ten target languages in a batch request. If you're not making a batch request, you can only specify a single target language with your request.
- Is it possible to get multiple translations of a word?
- No. This feature is only available via the web interface at translate.google.com
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2020-10-29 UTC.