v3 batch translation - multiple languages in source files

195 views
Skip to first unread message

Mike O'Brian

unread,
Jul 17, 2019, 8:50:21 PM7/17/19
to Google Cloud Translation API
Hi,

With the non-batch translations, you do not need to specify a source language and it will auto-detect and translate. However, with the batch translation, it appears the source language is required. We have a use case where there are mixed languages that need to be translated to a common target language.

Are there plans for the Batch Translation API be able to support multiple source languages in one source file?

Thanks

Kan Qiao

unread,
Jul 17, 2019, 8:55:02 PM7/17/19
to Google Cloud Translation API
Currently there is no plan for that.

To work around the issue, can you use different wildcard pattern to route multiple requests?

Mike O'Brian

unread,
Jul 17, 2019, 8:59:44 PM7/17/19
to Google Cloud Translation API
Well we don't necessarily know the source language on a translation-by-translation basis so there would have to be a language detection run on each string, so we may as well use the older API model where you don't have to specify the source language.  

That way we're still only making one call per string instead of one to detect the language, one to push up each language's TSV file, and then yet another for each language's batch run.

Thanks for letting me know.

Kan Qiao

unread,
Jul 17, 2019, 9:05:08 PM7/17/19
to Google Cloud Translation API
You mean that you have mixed languages even within a single file?

Mike O'Brian

unread,
Jul 18, 2019, 7:54:27 AM7/18/19
to Google Cloud Translation API
Correct. If we were to use the batch translation, our use case would be to throw different languages into a single file.  Since that isn't possible, we won't be able to use that functionality without detecting each language, separating each into individual files based on the language and then running the batch on each file.  Probably not worth the trouble at this point.
Reply all
Reply to author
Forward
0 new messages