Google Translate API Resources not working in China

130 views
Skip to first unread message

Ivan Balio

unread,
Mar 4, 2021, 10:56:28 AM3/4/21
to Google Cloud Translation API
Hello Everyone,
Good Day!

I'm trying to implement Google translate API in China but "translate.google.com" is blocked in china what I did is changed the api url to "translate.google.cn" but I have an error in the console that other resources uses "translate.google.com" instead of "translate.google.cn". Is there any alternative that I can change the resources to "translate.google.cn"?

"<div id="google_translate_element"></div>
<script type="text/javascript"> function googleTranslateElementInit() { new google.translate.TranslateElement({ pageLanguage: 'en', includedLanguages: 'zh-CN', layout: google.translate.TranslateElement.InlineLayout.SIMPLE }, 'google_translate_element'); } </script>

<script type="text/javascript" src="//translate.google.cn/translate_a/element.js?cb=googleTranslateElementInit"></script>

It works the "translate.google.cn" It's just that there are 3 resources that uses "translate.google.com" which is blocked in china.

Thanks,
Ivan
ERROR.PNG

Hu (Google Cloud Platform Support)

unread,
Mar 4, 2021, 2:34:10 PM3/4/21
to Google Cloud Translation API
We understand that access to our products has been problematic from within mainland China. We believe it may have been caused by networking conditions in China, rather than Google's own services. 

For further assistance with this issue, please contact one of our Technological partners: 

Our transparency report found here may also be useful: 

Thank you for your understanding.
Reply all
Reply to author
Forward
0 new messages