Translating text (Advanced) error

189 views
Skip to first unread message

X rinzuki

unread,
Jun 8, 2022, 10:28:17 AM6/8/22
to Google Cloud Translation API
Hello,
We are using Translating text (Advanced) to translate words from zh-CN to zh-TW, but today I found that this API reported an error, "Target language can't be equal to source language.".
Can you help me?
Thanks.

request body:
{
  "contents": ["测试"],
  "sourceLanguageCode": "zh-CN",
  "targetLanguageCode": "zh-TW"
}

response:
{
    "error": {
        "code": 400,
        "message": "Target language can't be equal to source language.",
        "status": "INVALID_ARGUMENT",
        "details": [
            {
                "@type": "type.googleapis.com/google.rpc.BadRequest",
                "fieldViolations": [
                    {
                        "field": "source_language_code",
                        "description": "Source language: zh-CN"
                    },
                    {
                        "field": "target_language_code",
                        "description": "Target language: zh-TW"
                    }
                ]
            }
        ]
    }
}

Auto ML

unread,
Jun 8, 2022, 7:45:01 PM6/8/22
to Google Cloud Translation API
I have the same error..
how can i fix it?

Lucas Ferreira

unread,
Jun 9, 2022, 10:36:10 AM6/9/22
to Google Cloud Translation API
Hi all, 

We are having the same issue, and I reported it here on June 7:
https://issuetracker.google.com/issues/235121273

This used to work fine but it seemed to have started on June 7.

We hope it can be fixed soon. 
None of our translations from zh-TW to zh-CN (and vice versa) are working properly.

Thanks,

Eduardo Ortiz Caraveo

unread,
Jun 9, 2022, 11:03:21 AM6/9/22
to Google Cloud Translation API
First of all, thank you for sharing the issue tracker, Lucas. What I would recommend to all of you is to wait for a response in the issue tracker that Lucas shared since I couldn’t find any information regarding the issue that you are facing, and it should work properly.
Reply all
Reply to author
Forward
0 new messages