Incomplete translation

Nemo 1 Reputation point
2022-08-29T17:23:44.817+00:00
I'm using Azure translator NodeJs api for translating 238 country name from English to several different languages for a select tag's options:          I'm noticing the translation always not perfect. I'm not mean the translation quality. sometimes, some country names not translated.           such as I need to translate below English into Somalia(I format the source text as value^text|value^text|....)          1000000^65| ^ |001^Abu Dhabi|002^Afghanistan|003^Albania|004^Alderney|005^Algeria|006^American Samoa|007^Andorra|008^Angola|009^Anguilla|010^Antigua / Barbuda|011^Argentina|012^Armenia|013^Aruba|014^Australia|015^Austria|016^Azerbaijan|..........          The translation is as below:     10000000^70| ^ |001^Abu Dhabi|002^Afghanistan|003^Albania|004^Alderney|005^Algeria|006^American Samoa|007^Andorra|008^Angola|009^Angu |010^Antigua / Barbuda|011^Argentina|012^Armenia|013^Aruba|014^Aruba|014^Austria||016^Azerbaijan|.....          As you can see the  014 is duplicated, 015 is missing...                    My target languages as below:          'fr',     'am' ,     'ar',     'zh-Hans' ,     'zh-Hant' ,     'fa' ,     'pt' ,     'pa' ,     'so' ,     'sw' ,     'fil'               the whole translation text as below:          1000000^65| ^ |001^Abu Dhabi|002^Afghanistan|003^Albania|004^Alderney|005^Algeria|006^American Samoa|007^Andorra|008^Angola|009^Anguilla|010^Antigua / Barbuda|011^Argentina|012^Armenia|013^Aruba|014^Australia|015^Austria|016^Azerbaijan|017^Bahamas Is.|018^Bahrain|019^Bangladesh|020^Barbados|021^Belarus|022^Belgium|023^Belize|024^Benin Peoples Republic|025^Bermuda|026^Bhutan|027^Bolivia|028^Bophuthatswana|029^Bosnia and Herzegovina|030^Botswana Republic Of|031^Brazil|032^Brechou|033^Brit. Virgin Islands|034^Brunei|035^Bulgaria|036^Burkina Faso|038^Burundi|039^Cameroon|040^Canada|041^Canary Islands|042^Cape Verde|043^Cayman Islands|044^Cent. African Republic|045^Chad Republic Of|046^Chad, Republic Of|047^Chile|048^China (PRC)|049^Colombia|050^Comoros|051^Congo Democratic Republic of|052^Congo Republic Of|053^Cook Islands|054^Costa Rica|055^Croatia|056^Cuba|057^Cyprus|058^Czech Republic|059^Denmark|060^Djibouti|061^Dominican Republic|062^Ecuador|063^Egypt|064^El Salvador|065^England|066^Equatorial Guinea|067^Eritrea|068^Estonia|069^Ethiopia|070^Falkland Is.|071^Federal Rep. Of Germany|072^Fiji|073^Finland|074^Formosa|075^Fr. Polynesia|076^France|077^French Guiana|078^Gabon Republic|079^Gambia|080^Georgia|081^Ghana|082^Gibraltar|083^Greece|084^Greenland|085^Grenada|086^Guadaloupe|087^Guam|088^Guatemala|089^Guinea Republic|090^Guinea-bissau|091^Guyana|092^Haiti|093^Honduras|094^Hong Kong|095^Hungary|096^Iceland|097^India|098^Indonesia Republic Of|099^Iran|100^Iraq|101^Ireland, Republic of|102^Israel|103^Italy|104^Ivory Coast Republic|105^Jamaica|106^Japan|107^Jordan|108^Kampuchea Democratic|109^Kazakhstan|110^Kenya|111^Kerguelen Islands|113^Kiribati|114^Korea North|115^Korea South|116^Kosovo|117^Kuwait|112^Kyrgyzstan|118^Laos|119^Latvia|120^Lebanon|121^Lesotho|122^Liberia|123^Libya|124^Liechtenstein|125^Lithuania|126^Luxembourg|127^Macao|128^Macedonia|129^Madagascar|130^Malawi|131^Malaysia|132^Maldives, Republic Of|133^Mali, Republic Of|134^Malta|135^Marshall Is.|136^Martinique|137^Mauritania|138^Mauritius|139^Mayotte|140^Mexico|141^Moldova|142^Monaco|143^Mongolia People's Republic|144^Montserrat|145^Morocco|146^Mozambique|037^Myanmar|147^Namibia|148^Nauru|149^Nepal|150^Netherlands|151^Netherlands, Ant.|152^Nevis|153^New Caledonia|154^New Zealand|155^Nicaragua|156^Niger Republic|157^Nigeria|158^Northern Ireland|159^Norway|239^Oman|160^Pakistan|161^Palestine|162^Panama|163^Panama Canal Zone|164^Papua New Guinea|165^Paraguay|166^Peru|167^Philippines|168^Pitcairn Is.|169^Poland|170^Portugal|171^Puerto Rico|172^Qatar|173^Reunion|174^Romania|175^Russia|176^Rwanda|177^Samoa, Western|178^San Marino|179^Sao Tome E Principe|180^Saudi Arabia|181^Scotland|182^Senegal|183^Serbia|184^Seychelles|185^Sierra Leone|186^Singapore|243^Slovakia (Slovak Republic)|242^Slovenia|187^Solomons, The|188^Somalia|189^South Africa, Republic Of|240^South Sudan|190^Spain|191^Sri Lanka|192^St.Helena|193^St.Kitts-nevis|194^St.Lucia|195^St.Pierre Et Miquelon|196^St.Vincent And The Grenadines|197^Stateless|198^Sudan Dem. Rep. Of|199^Suriname|200^Swaziland|201^Sweden|202^Switzerland|203^Syria|244^Taiwan (ROC)|204^Tajikistan|205^Tanzania, United Republic Of|206^Thailand|207^Tibet|208^Togo Republic Of|209^Tonga|210^Trinidad & Tobago Dem. Rep. Of|211^Tunisia|212^Turkey|213^Turkmenistan|214^Turks & Caicos|215^Tuvalu|216^U.S. Virgin Is.|218^U.S.S.R.|219^Uganda|220^Ukraine|221^United Arab Emirates|241^United Kingdom|217^United States Of America|222^Unknown|223^Uruguay|224^Uzbekistan|225^Vanuatu|226^Vatican City St.|227^Venezuela|228^Vietnam|229^Vietnam South|230^Vietnam, Socialist Republic Of|231^Wales|232^Wallis And Futuna|233^Western Sahara|234^Yemen, Republic Of|235^Yugoslavia|236^Zaire, Republic Of|237^Zambia|238^Zimbabwe         The API I'm using is:          function MS_TextTrans(text_src, tar_len) {       let options = {           method: "POST",         baseUrl: endpoint,         url: "translate",         qs: {             "api-version": "3.0",             to: tar_len,         },         headers: {             "Ocp-Apim-Subscription-Key": subscriptionKey,             "Ocp-Apim-Subscription-Region": region,             "Content-type": "application/json",             "X-ClientTraceId": uuidv4().toString(),         },         body: [             {                  text: text_src,             },         ],         json: true,     };            request(options, function (err, res, body) {           MS_TextTransRes(body[0]["translations"][0]["text"]);     });     }          I webpack it for client usage. Not sure if there are some special configuration to improve the translation. thanks.

Azure Translator
Azure Translator
An Azure service to easily conduct machine translation with a simple REST API call.
343 questions
{count} votes

3 answers

Sort by: Most helpful
  1. Nemo 1 Reputation point
    2022-08-30T21:20:30+00:00

    After debugging,

    I used

    [{"Text":65},{"Text":" "},{"Text":"Abu Dhabi"},{"Text":"Afghanistan"},{"Text":"Albania"},{"Text":"Alderney"},{"Text":"Algeria"},{"Text":"American Samoa"},{"Text":"Andorra"},{"Text":"Angola"},{"Text":"Anguilla"},{"Text":"Antigua / Barbuda"},{"Text":"Argentina"},{"Text":"Armenia"},{"Text":"Aruba"},{"Text":"Australia"},{"Text":"Austria"},{"Text":"Azerbaijan"},{"Text":"Bahamas Is."},{"Text":"Bahrain"},{"Text":"Bangladesh"},{"Text":"Barbados"},{"Text":"Belarus"},{"Text":"Belgium"},{"Text":"Belize"},{"Text":"Benin Peoples Republic"},{"Text":"Bermuda"},{"Text":"Bhutan"},{"Text":"Bolivia"},{"Text":"Bophuthatswana"},{"Text":"Bosnia and Herzegovina"},{"Text":"Botswana Republic Of"},{"Text":"Brazil"},{"Text":"Brechou"},{"Text":"Brit. Virgin Islands"},{"Text":"Brunei"},{"Text":"Bulgaria"},{"Text":"Burkina Faso"},{"Text":"Burundi"},{"Text":"Cameroon"},{"Text":"Canada"},{"Text":"Canary Islands"},{"Text":"Cape Verde"},{"Text":"Cayman Islands"},{"Text":"Cent. African Republic"},{"Text":"Chad Republic Of"},{"Text":"Chad, Republic Of"},{"Text":"Chile"},{"Text":"China (PRC)"},{"Text":"Colombia"},{"Text":"Comoros"},{"Text":"Congo Democratic Republic of"},{"Text":"Congo Republic Of"},{"Text":"Cook Islands"},{"Text":"Costa Rica"},{"Text":"Croatia"},{"Text":"Cuba"},{"Text":"Cyprus"},{"Text":"Czech Republic"},{"Text":"Denmark"},{"Text":"Djibouti"},{"Text":"Dominican Republic"},{"Text":"Ecuador"},{"Text":"Egypt"},{"Text":"El Salvador"},{"Text":"England"},{"Text":"Equatorial Guinea"},{"Text":"Eritrea"},{"Text":"Estonia"},{"Text":"Ethiopia"},{"Text":"Falkland Is."},{"Text":"Federal Rep. Of Germany"},{"Text":"Fiji"},{"Text":"Finland"},{"Text":"Formosa"},{"Text":"Fr. Polynesia"},{"Text":"France"},{"Text":"French Guiana"},{"Text":"Gabon Republic"},{"Text":"Gambia"},{"Text":"Georgia"},{"Text":"Ghana"},{"Text":"Gibraltar"},{"Text":"Greece"},{"Text":"Greenland"},{"Text":"Grenada"},{"Text":"Guadaloupe"},{"Text":"Guam"},{"Text":"Guatemala"},{"Text":"Guinea Republic"},{"Text":"Guinea-bissau"},{"Text":"Guyana"},{"Text":"Haiti"},{"Text":"Honduras"},{"Text":"Hong Kong"},{"Text":"Hungary"},{"Text":"Iceland"},{"Text":"India"},{"Text":"Indonesia Republic Of"},{"Text":"Iran"},{"Text":"Iraq"},{"Text":"Ireland, Republic of"},{"Text":"Israel"},{"Text":"Italy"},{"Text":"Ivory Coast Republic"},{"Text":"Jamaica"},{"Text":"Japan"},{"Text":"Jordan"},{"Text":"Kampuchea Democratic"},{"Text":"Kazakhstan"},{"Text":"Kenya"},{"Text":"Kerguelen Islands"},{"Text":"Kiribati"},{"Text":"Korea North"},{"Text":"Korea South"},{"Text":"Kosovo"},{"Text":"Kuwait"},{"Text":"Kyrgyzstan"},{"Text":"Laos"},{"Text":"Latvia"},{"Text":"Lebanon"},{"Text":"Lesotho"},{"Text":"Liberia"},{"Text":"Libya"},{"Text":"Liechtenstein"},{"Text":"Lithuania"},{"Text":"Luxembourg"},{"Text":"Macao"},{"Text":"Macedonia"},{"Text":"Madagascar"},{"Text":"Malawi"},{"Text":"Malaysia"},{"Text":"Maldives, Republic Of"},{"Text":"Mali, Republic Of"},{"Text":"Malta"},{"Text":"Marshall Is."},{"Text":"Martinique"},{"Text":"Mauritania"},{"Text":"Mauritius"},{"Text":"Mayotte"},{"Text":"Mexico"},{"Text":"Moldova"},{"Text":"Monaco"},{"Text":"Mongolia People's Republic"},{"Text":"Montserrat"},{"Text":"Morocco"},{"Text":"Mozambique"},{"Text":"Myanmar"},{"Text":"Namibia"},{"Text":"Nauru"},{"Text":"Nepal"},{"Text":"Netherlands"},{"Text":"Netherlands, Ant."},{"Text":"Nevis"},{"Text":"New Caledonia"},{"Text":"New Zealand"},{"Text":"Nicaragua"},{"Text":"Niger Republic"},{"Text":"Nigeria"},{"Text":"Northern Ireland"},{"Text":"Norway"},{"Text":"Oman"},{"Text":"Pakistan"},{"Text":"Palestine"},{"Text":"Panama"},{"Text":"Panama Canal Zone"},{"Text":"Papua New Guinea"},{"Text":"Paraguay"},{"Text":"Peru"},{"Text":"Philippines"},{"Text":"Pitcairn Is."},{"Text":"Poland"},{"Text":"Portugal"},{"Text":"Puerto Rico"},{"Text":"Qatar"},{"Text":"Reunion"},{"Text":"Romania"},{"Text":"Russia"},{"Text":"Rwanda"},{"Text":"Samoa, Western"},{"Text":"San Marino"},{"Text":"Sao Tome E Principe"},{"Text":"Saudi Arabia"},{"Text":"Scotland"},{"Text":"Senegal"},{"Text":"Serbia"},{"Text":"Seychelles"},{"Text":"Sierra Leone"},{"Text":"Singapore"},{"Text":"Slovakia (Slovak Republic)"},{"Text":"Slovenia"},{"Text":"Solomons, The"},{"Text":"Somalia"},{"Text":"South Africa, Republic Of"},{"Text":"South Sudan"},{"Text":"Spain"},{"Text":"Sri Lanka"},{"Text":"St.Helena"},{"Text":"St.Kitts-nevis"},{"Text":"St.Lucia"},{"Text":"St.Pierre Et Miquelon"},{"Text":"St.Vincent And The Grenadines"},{"Text":"Stateless"},{"Text":"Sudan Dem. Rep. Of"},{"Text":"Suriname"},{"Text":"Swaziland"},{"Text":"Sweden"},{"Text":"Switzerland"},{"Text":"Syria"},{"Text":"Taiwan (ROC)"},{"Text":"Tajikistan"},{"Text":"Tanzania, United Republic Of"},{"Text":"Thailand"},{"Text":"Tibet"},{"Text":"Togo Republic Of"},{"Text":"Tonga"},{"Text":"Trinidad & Tobago Dem. Rep. Of"},{"Text":"Tunisia"},{"Text":"Turkey"},{"Text":"Turkmenistan"},{"Text":"Turks & Caicos"},{"Text":"Tuvalu"},{"Text":"U.S. Virgin Is."},{"Text":"U.S.S.R."},{"Text":"Uganda"},{"Text":"Ukraine"},{"Text":"United Arab Emirates"},{"Text":"United Kingdom"},{"Text":"United States Of America"},{"Text":"Unknown"},{"Text":"Uruguay"},{"Text":"Uzbekistan"},{"Text":"Vanuatu"},{"Text":"Vatican City St."},{"Text":"Venezuela"},{"Text":"Vietnam"},{"Text":"Vietnam South"},{"Text":"Vietnam, Socialist Republic Of"},{"Text":"Wales"},{"Text":"Wallis And Futuna"},{"Text":"Western Sahara"},{"Text":"Yemen, Republic Of"},{"Text":"Yugoslavia"},{"Text":"Zaire, Republic Of"},{"Text":"Zambia"},{"Text":"Zimbabwe"}]

    the response from the API(body[0]["translations"]) is as below, there are a lot of names not translated.

    "[{“Text”:65},{“Text”:“ ”},{“Text”:“Abu Dhabi”},{“Text”:“Afghan”},{“Text”:“Albania”},{“Text”:“Alderney”},{“Text”:“阿尔及利亚”},{“Text”:“美属萨摩亚”},{“Text”:“安道尔”},{“Text”:“Arab”},{“Text”:“Anguilla”},{“Text”:“Antigua / Barbuda”},{“Text”:“Argentina”},{“Text”:“Armenia”},{“Text”:“Aruba”},{“Text”:“Australia”},{“Text”:“Austria”},{“Text”:“Text”},{“Text”:“Bahamas Is.”},{“Text”:“Bahrain”},{“Text”:“Bangladesh”},{“Text”:“Barbados”},{“Text”:“Text”},{“Text”:“Alba”},{“Text”:“Text”},{“Text”:“Alba”},{“Text”:“Text”},{“Text”:“Albas”:“Text”}”白俄罗斯“},{”Text“:”Belgium“},{”Text“:”Belize“},{”Text“:”贝宁人民共和国“},{”Text“:”Bermuda“},{”Text“:”Bhutan“},{”Text“:”Bolivia“},{”Text“:”Bophuthatswana“},{”Text“:”波斯尼亚和黑塞哥维那“},{”Text“:”博茨瓦纳共和国“},{”Text“:”Brazil“},{”Text“:”Brechou“},{”Text“:”Brit. Virgin Islands“},{”Text“:”Brunei“},{”Text“:”Bulgaria“},{”Text“:”Text“},{”Text“:”Text“},{”Text“:”Text“},{”Text“},{”Text“},{”Text“}。Verde“},{”Text“:”开曼群岛“},{”Text“:”Cent. African Republic“},{”Text“:”Chad Republic of“},{”Text“:”Chad, Republic of“},{”Text“:”Chile“},{”Text“:”China (PRC)“},{”Text“:”Colombia“},{”Text“:”Comoros“},{”Text“:”Congo Democratic Republic of“},{”Text“:”Congo Republic of“},{”Text“:”Cook Islands“},{”Text“:”Costa Rica“},{”Text“:”Croatia“},{”Text“:”Cuba“},{”Text“:”Cyprus“},{”Text“:”Czech Republic“},{”Text“:”Denmark“},{”Text“:”Dominican Republic“},{“Text”:“Ecuador”},{“Text”:“Egypt”},{“Text”:“萨尔瓦多”},{“Text”:“England”},{“Text”:“Equatorial Guinea”},{“Text”:“Eritrea”},{“Text”:“Estonia”},{“Text”:“Ethiopia”},{“Text”:“Falkland Is.”},{“Text”:“Federal Rep. Of Germany”},{“Text”:“Fiji”},{“Text”:“Finland”},{“Text”:“Formosa”},{“Text”:“Text”},{“Text”:“Text”},{“Text”:“France”},{“Text”:“French Guiana”},{“Text”:“Gabon Republic”},{“Text”:“Gambia”},{“Text”:“Georgia”},{“Text”:“Ghana”},{“Text”:“Gibraltar”},{“Text”:“Text”:“Text”}”Greece“},{”Text“:”Greenland“},{”Text“:”Grenada“},{”Text“:”Guadaloupe“},{”Text“:”Guam“},{”Text“:”Guatemala“},{”Text“:”Text“},{”Text“:”几内亚比绍“},{”Text“:”Guyana“},{”Text“:”Haiti“},{”Text“:”Honduras“},{”Text“:”Hong Kong“},{”Text“},{”Text“:”Text“},{”Text“:”Iceland“},{”Text“:”Text“:”Italy“},{”Text“},{”Text“:”Iran“},{”Text“:”India“},{”Text“},{”Text“:”Ireland, Republic of“},{”Text“:”Israel“},{”Text“:”Italy“},{”Text“:”Ivory Coast Republic“},{”Text“},{”Text“:”Jamaica“},{”Text“:”Japan“},{”Text“:”Jordan“},{”Text“:”Kampuchea Democratic“},{”Text“:”Kazakhstan“},{”Text“:”Kenya“},{”Text“:”Kerguelen Islands“},{”Text“:”Kiribati“},{”Text“:”Korea North“},{”Text“:”Korea South“},{”Text“:”Kosovo“},{”Text“:”Kuwait“},{”Text“:”吉尔吉斯斯坦“},{”Text“:”Laos“},{”Text“:”Latvia“},{”Text“:”Lebanon“},{”Text“:”Lesotho“},{”Text“:”Liberia“},{”Text“:”Libya“},{”Text“:”Liechtenstein“},{”Text“:”立陶宛“},{”Text“:”Luxembourg“},{”Text“:”Macao“},{”Text“:”Macedonia“},{”Text“:”Madagascar“},{”Text“},{”Text“:”Malaysia“},{”Text“:”Maldives, Republic of“},{”Text“:”Mali, Republic of“},{”Text“:”Malta“},{”Text“:”Marshall Is.“},{”Text“:”Martinique“},{”Text“:”Mauritania“},{”Text“:”Mauritius“},{”Text“:”Mayotte“},{”Text“:”Text“},{”Text“:”Mozambique“},{”Text“:”Mozambique“},{”Text“:”Myanmar“},{“Text”:“纳米比亚”},{“Text”:“Nauru”},{“Text”:“Nepal”},{“Text”:“Netherlands”},{“Text”:“Netherlands, Ant.”},{“Text”:“Nevis”},{“Text”:“New Caledonia”},{“Text”:“New Zealand”},{“Text”:“Text”},{“Text”:“Niger Republic”},{“Text”:“Nigeria”},{“Text”:“North Ireland”},{“Text”:“Norway”},{“Text”:“Text”:“Text”},{“Text”:“Pakistan”},{“Text”},{“Text”:“Panama”},{“Text”:“Panama Canal Zone”},{“Text”:“Papua New Guinea”},{“Text”:“Paraguay”},{“Text”:“Peru”},{“Text”},{“Text”:“Philippines”},{“Text”:“Pitcairn Is.”},{“Text”:“Poland”},{“Text”},{“Text”},{“Text”:“Puerto Rico”},{“Text”:“Qatar”},{“Text”:“Reunion”},{“Text”:“Romania”},{“Text”:“Russia”},{“Text”:“Text”},{“Text”:“Samoa, Western”},{“Text”:“San Marino”},{“Text”:“Sao Tome E prrincipe”},{“Text”:“Saudi Arabia”},{“Text”:“Scotland”},{“Text”:“Senegal”},{“Text”:“Serbia”},{“Text”:“Seychelles”},{“Text”:“Sierra Leone”},{“Text”:“Singapore”},{“Text”:“斯洛伐克(斯洛伐克共和国)”},{”Text“:”Slovenia“},{”Text“:”Solomons, The“},{”Text“:”索马里“},{”Text“:”South Africa, Republic of“},{”Text“:”South Sudan“},{”Text“:”Spain“},{”Text“:”Sri Lanka“},{”Text“:”St.Helena“},{”Text“:”St.Kitts-nevis“},{”Text“:”St.Lucia“},{”Text“:”St.Pierre et Miquelon“},{”Text“:”St.Vincent and the Grenadines“},{”Text“:”Stateless“},{”Text“:”Sudan Dem. Rep. Of“},{”Text“:”Text“:”Surinam“},{”Text“:”Swaziland“},{”Text“:”Sweden“},{”Text“:”Switzerland“},{”Text“:”Syria“},{”Text“:”Text“:”Text“},{”Text“:”Text“},{”Text“:”Text“}”,{“Text”}“,{”Text“:”Text“},{”Text“}”,{“Text”}“Text”},{“Text”}“”Text“},{”Text“}”Text“},{”Text“}台湾(ROC)“},{”Text“:”塔吉克斯坦“},{”Text“:”坦桑尼亚,联合共和国“},{”Text“:”泰国“},{”Text“:”Tibet“},{”Text“:”Togo Republic of“},{”Text“:”Tonga“},{”Text“:”Trinidad & Tobago Dem. Rep. Of“},{”Text“:”Tunisia“},{”Text“:”Turkey“},{”Text“:”Turkmenstan“},{”Text“:”Turkmans“},{”Text“:”Text“},{”Text“:”United Arab Emirates“},{”Text“:”United Arab Emirates“},{”Text“:”United Kingdom“},{“Text”:“United States of America”},{“Text”:“Unknown”},{“Text”:“Uruguay”},{“Text”:“乌兹别克斯坦”},{“Text”:“Vanuatu”},{“Text”:“Vatican City St.”},{“Text”:“Venezuela”},{“text”:“越南”},{“text”:“越南 South”},{“text”:“越南, Socialist Republic of”},{“text”:“Wales”},{“Text”:“Wallis and Futuna”},{“Text”:“Western Sahara”},{“Text”:“Yemen, Republic of”},{“text”:“Yugoslavia”},{“text”:“Zaire, Republic of”},{“text”:“Zambia”},{“Text”:“Zimbabwe”}]"

    and I noticed the double quotes are not the normal ones. I made a screenshot for your reference.
    236371-notepad-ujhky6axgm.png

    but I test the rest api in vs code, it works fine as belwo:

    [  
      {  
        "detectedLanguage": {  
          "language": "en",  
          "score": 0.0  
        },  
        "translations": [  
          {  
            "text": "65",  
            "to": "zh-Hans"  
          }  
        ]  
      },  
      {  
        "detectedLanguage": {  
          "language": "en",  
          "score": 0.0  
        },  
        "translations": [  
          {  
            "text": " ",  
            "to": "zh-Hans"  
          }  
        ]  
      },  
      {  
        "detectedLanguage": {  
          "language": "en",  
          "score": 1.0  
        },  
        "translations": [  
          {  
            "text": "阿布扎比",  
            "to": "zh-Hans"  
          }  
        ]  
      },  
      {  
        "detectedLanguage": {  
          "language": "en",  
          "score": 1.0  
        },  
        "translations": [  
          {  
            "text": "阿富汗",  
            "to": "zh-Hans"  
          }  
        ]  
      },  
      {  
        "detectedLanguage": {  
          "language": "en",  
          "score": 1.0  
        },  
        "translations": [  
          {  
            "text": "阿尔巴尼亚",  
            "to": "zh-Hans"  
          }  
        ]  
      },  
      {  
        "detectedLanguage": {  
          "language": "en",  
          "score": 1.0  
        },  
        "translations": [  
          {  
            "text": "奥尔德尼岛",  
            "to": "zh-Hans"  
          }  
        ]  
      },  
      {  
        "detectedLanguage": {  
          "language": "en",  
          "score": 1.0  
        },  
        "translations": [  
          {  
            "text": "阿尔及利亚",  
            "to": "zh-Hans"  
          }  
        ]  
      },  
      {  
        "detectedLanguage": {  
          "language": "en",  
          "score": 1.0  
        },  
        "translations": [  
          {  
            "text": "美属萨摩亚",  
            "to": "zh-Hans"  
          }  
        ]  
      },  
      {  
        "detectedLanguage": {  
          "language": "ca",  
          "score": 1.0  
        },  
        "translations": [  
          {  
            "text": "安道尔",  
            "to": "zh-Hans"  
          }  
        ]  
      },  
      {  
        "detectedLanguage": {  
          "language": "pt",  
          "score": 1.0  
        },  
        "translations": [  
          {  
            "text": "安哥拉",  
            "to": "zh-Hans"  
          }  
        ]  
      },  
      {  
        "detectedLanguage": {  
          "language": "en",  
          "score": 1.0  
        },  
        "translations": [  
          {  
            "text": "安圭拉",  
            "to": "zh-Hans"  
          }  
        ]  
      },  
      {  
        "detectedLanguage": {  
          "language": "es",  
          "score": 1.0  
        },  
        "translations": [  
          {  
            "text": "安提瓜/巴布达",  
            "to": "zh-Hans"  
          }  
        ]  
      },  
      {  
        "detectedLanguage": {  
          "language": "es",  
          "score": 1.0  
        },  
        "translations": [  
          {  
            "text": "阿根廷",  
            "to": "zh-Hans"  
          }  
        ]  
      },  
      {  
        "detectedLanguage": {  
          "language": "en",  
          "score": 1.0  
        },  
        "translations": [  
          {  
            "text": "亚美尼亚",  
            "to": "zh-Hans"  
          }  
        ]  
      },  
      {  
        "detectedLanguage": {  
          "language": "en",  
          "score": 1.0  
        },  
        "translations": [  
          {  
            "text": "阿鲁巴岛",  
            "to": "zh-Hans"  
          }  
        ]  
      },  
      {  
        "detectedLanguage": {  
          "language": "en",  
          "score": 1.0  
        },  
        "translations": [  
          {  
            "text": "澳大利亚",  
            "to": "zh-Hans"  
          }  
        ]  
      },  
      {  
        "detectedLanguage": {  
          "language": "en",  
          "score": 1.0  
        },  
        "translations": [  
          {  
            "text": "奥地利",  
            "to": "zh-Hans"  
          }  
        ]  
      },  
      {  
        "detectedLanguage": {  
          "language": "en",  
          "score": 1.0  
        },  
        "translations": [  
          {  
            "text": "阿塞拜疆",  
            "to": "zh-Hans"  
          }  
        ]  
      },  
      {  
        "detectedLanguage": {  
          "language": "en",  
          "score": 1.0  
        },  
        "translations": [  
          {  
            "text": "巴哈马群岛。",  
            "to": "zh-Hans"  
          }  
        ]  
      },  
      {  
        "detectedLanguage": {  
          "language": "en",  
          "score": 1.0  
        },  
        "translations": [  
          {  
            "text": "巴林",  
            "to": "zh-Hans"  
          }  
        ]  
      },  
      {  
        "detectedLanguage": {  
          "language": "en",  
          "score": 1.0  
        },  
        "translations": [  
          {  
            "text": "孟加拉国",  
            "to": "zh-Hans"  
          }  
        ]  
      },  
      {  
        "detectedLanguage": {  
          "language": "en",  
          "score": 1.0  
        },  
        "translations": [  
          {  
            "text": "巴巴多斯",  
            "to": "zh-Hans"  
          }  
        ]  
      },  
      {  
        "detectedLanguage": {  
          "language": "en",  
          "score": 1.0  
        },  
        "translations": [  
          {  
            "text": "白俄罗斯",  
            "to": "zh-Hans"  
          }  
        ]  
      },  
      {  
        "detectedLanguage": {  
          "language": "en",  
          "score": 1.0  
        },  
        "translations": [  
          {  
            "text": "比利时",  
            "to": "zh-Hans"  
          }  
        ]  
      },  
      {  
        "detectedLanguage": {  
          "language": "en",  
          "score": 1.0  
        },  
        "translations": [  
          {  
            "text": "伯利兹",  
            "to": "zh-Hans"  
          }  
        ]  
      },  
      {  
        "detectedLanguage": {  
          "language": "en",  
          "score": 1.0  
        },  
        "translations": [  
          {  
            "text": "贝宁人民共和国",  
            "to": "zh-Hans"  
          }  
        ]  
      },  
      {  
        "detectedLanguage": {  
          "language": "en",  
          "score": 1.0  
        },  
        "translations": [  
          {  
            "text": "百慕大",  
            "to": "zh-Hans"  
          }  
        ]  
      },  
      {  
        "detectedLanguage": {  
          "language": "en",  
          "score": 1.0  
        },  
        "translations": [  
          {  
            "text": "不丹",  
            "to": "zh-Hans"  
          }  
        ]  
      },  
      {  
        "detectedLanguage": {  
          "language": "es",  
          "score": 1.0  
        },  
        "translations": [  
          {  
            "text": "玻利维亚",  
            "to": "zh-Hans"  
          }  
        ]  
      },  
      {  
        "detectedLanguage": {  
          "language": "en",  
          "score": 1.0  
        },  
        "translations": [  
          {  
            "text": "博普塔茨瓦纳",  
            "to": "zh-Hans"  
          }  
        ]  
      },  
      {  
        "detectedLanguage": {  
          "language": "en",  
          "score": 1.0  
        },  
        "translations": [  
          {  
            "text": "波斯尼亚和黑塞哥维那",  
            "to": "zh-Hans"  
          }  
        ]  
      },  
      {  
        "detectedLanguage": {  
          "language": "en",  
          "score": 1.0  
        },  
        "translations": [  
          {  
            "text": "博茨瓦纳共和国",  
            "to": "zh-Hans"  
          }  
        ]  
      },  
      {  
        "detectedLanguage": {  
          "language": "en",  
          "score": 1.0  
        },  
        "translations": [  
          {  
            "text": "巴西",  
            "to": "zh-Hans"  
          }  
        ]  
      },  
      {  
        "detectedLanguage": {  
          "language": "en",  
          "score": 1.0  
        },  
        "translations": [  
          {  
            "text": "布雷乔",  
            "to": "zh-Hans"  
          }  
        ]  
      },  
      {  
        "detectedLanguage": {  
          "language": "en",  
          "score": 1.0  
        },  
        "translations": [  
          {  
            "text": "英属维尔京群岛",  
            "to": "zh-Hans"  
          }  
        ]  
      },  
      {  
        "detectedLanguage": {  
          "language": "en",  
          "score": 1.0  
        },  
        "translations": [  
          {  
            "text": "文莱",  
            "to": "zh-Hans"  
          }  
        ]  
      },  
      {  
        "detectedLanguage": {  
          "language": "en",  
          "score": 1.0  
        },  
        "translations": [  
          {  
            "text": "保加利亚",  
            "to": "zh-Hans"  
          }  
        ]  
      },  
      {  
        "detectedLanguage": {  
          "language": "fr",  
          "score": 1.0  
        },  
        "translations": [  
          {  
            "text": "布基纳法索",  
            "to": "zh-Hans"  
          }  
        ]  
      },  
      {  
        "detectedLanguage": {  
          "language": "fr",  
          "score": 1.0  
        },  
        "translations": [  
          {  
            "text": "蒲隆地",  
            "to": "zh-Hans"  
          }  
        ]  
      },  
      {  
        "detectedLanguage": {  
          "language": "en",  
          "score": 1.0  
        },  
        "translations": [  
          {  
            "text": "喀麦隆",  
            "to": "zh-Hans"  
          }  
        ]  
      },  
      {  
        "detectedLanguage": {  
          "language": "en",  
          "score": 1.0  
        },  
        "translations": [  
          {  
            "text": "加拿大",  
            "to": "zh-Hans"  
          }  
        ]  
      },  
      {  
        "detectedLanguage": {  
          "language": "en",  
          "score": 1.0  
        },  
        "translations": [  
          {  
            "text": "加那利群岛",  
            "to": "zh-Hans"  
          }  
        ]  
      },  
      {  
        "detectedLanguage": {  
          "language": "en",  
          "score": 1.0  
        },  
        "translations": [  
          {  
            "text": "佛得角",  
            "to": "zh-Hans"  
          }  
        ]  
      },  
      {  
        "detectedLanguage": {  
          "language": "en",  
          "score": 1.0  
        },  
        "translations": [  
          {  
            "text": "开曼群岛",  
            "to": "zh-Hans"  
          }  
        ]  
      },  
      {  
        "detectedLanguage": {  
          "language": "en",  
          "score": 1.0  
        },  
        "translations": [  
          {  
            "text": "美分 非洲共和國",  
            "to": "zh-Hans"  
          }  
        ]  
      },  
      {  
        "detectedLanguage": {  
          "language": "en",  
          "score": 1.0  
        },  
        "translations": [  
          {  
            "text": "乍得共和国",  
            "to": "zh-Hans"  
          }  
        ]  
      },  
      {  
        "detectedLanguage": {  
          "language": "en",  
          "score": 1.0  
        },  
        "translations": [  
          {  
            "text": "乍得共和国",  
            "to": "zh-Hans"  
          }  
        ]  
      },  
      {  
        "detectedLanguage": {  
          "language": "es",  
          "score": 1.0  
        },  
        "translations": [  
          {  
            "text": "智利",  
            "to": "zh-Hans"  
          }  
        ]  
      },  
      {  
        "detectedLanguage": {  
          "language": "en",  
          "score": 1.0  
        },  
        "translations": [  
          {  
            "text": "中国(中国)",  
            "to": "zh-Hans"  
          }  
        ]  
      },  
      {  
        "detectedLanguage": {  
          "language": "es",  
          "score": 1.0  
        },  
        "translations": [  
          {  
            "text": "哥伦比亚",  
            "to": "zh-Hans"  
          }  
        ]  
      },  
      {  
        "detectedLanguage": {  
          "language": "en",  
          "score": 1.0  
        },  
        "translations": [  
          {  
            "text": "科摩罗",  
            "to": "zh-Hans"  
          }  
        ]  
      },  
      {  
        "detectedLanguage": {  
          "language": "en",  
          "score": 1.0  
        },  
        "translations": [  
          {  
            "text": "刚果(金)",  
            "to": "zh-Hans"  
          }  
        ]  
      },  
      {  
        "detectedLanguage": {  
          "language": "en",  
          "score": 1.0  
        },  
        "translations": [  
          {  
            "text": "刚果共和国",  
            "to": "zh-Hans"  
          }  
        ]  
      },  
      {  
        "detectedLanguage": {  
          "language": "en",  
          "score": 1.0  
        },  
        "translations": [  
          {  
            "text": "库克群岛",  
            "to": "zh-Hans"  
          }  
        ]  
      },  
      {  
        "detectedLanguage": {  
          "language": "es",  
          "score": 1.0  
        },  
        "translations": [  
          {  
            "text": "哥斯达黎加",  
            "to": "zh-Hans"  
          }  
        ]  
      },  
      {  
        "detectedLanguage": {  
          "language": "en",  
          "score": 1.0  
        },  
        "translations": [  
          {  
            "text": "克罗地亚",  
            "to": "zh-Hans"  
          }  
        ]  
      },  
      {  
        "detectedLanguage": {  
          "language": "en",  
          "score": 1.0  
        },  
        "translations": [  
          {  
            "text": "古巴",  
            "to": "zh-Hans"  
          }  
        ]  
      },  
      {  
        "detectedLanguage": {  
          "language": "en",  
          "score": 1.0  
        },  
        "translations": [  
          {  
            "text": "塞浦路斯",  
            "to": "zh-Hans"  
          }  
        ]  
      },  
      {  
        "detectedLanguage": {  
          "language": "en",  
          "score": 1.0  
        },  
        "translations": [  
          {  
            "text": "捷克共和国",  
            "to": "zh-Hans"  
          }  
        ]  
      },  
      {  
        "detectedLanguage": {  
          "language": "en",  
          "score": 1.0  
        },  
        "translations": [  
          {  
            "text": "丹麦",  
            "to": "zh-Hans"  
          }  
        ]  
      },  
      {  
        "detectedLanguage": {  
          "language": "fr",  
          "score": 1.0  
        },  
        "translations": [  
          {  
            "text": "吉布提",  
            "to": "zh-Hans"  
          }  
        ]  
      },  
      {  
        "detectedLanguage": {  
          "language": "en",  
          "score": 1.0  
        },  
        "translations": [  
          {  
            "text": "多米尼加共和国",  
            "to": "zh-Hans"  
          }  
        ]  
      },  
      {  
        "detectedLanguage": {  
          "language": "es",  
          "score": 1.0  
        },  
        "translations": [  
          {  
            "text": "厄瓜多尔",  
            "to": "zh-Hans"  
          }  
        ]  
      },  
      {  
        "detectedLanguage": {  
          "language": "en",  
          "score": 1.0  
        },  
        "translations": [  
          {  
            "text": "埃及",  
            "to": "zh-Hans"  
          }  
        ]  
      },  
      {  
        "detectedLanguage": {  
          "language": "es",  
          "score": 1.0  
        },  
        "translations": [  
          {  
            "text": "萨尔瓦多",  
            "to": "zh-Hans"  
          }  
        ]  
      },  
      {  
        "detectedLanguage": {  
          "language": "en",  
          "score": 1.0  
        },  
        "translations": [  
          {  
            "text": "英国",  
            "to": "zh-Hans"  
          }  
        ]  
      },  
      {  
        "detectedLanguage": {  
          "language": "en",  
          "score": 1.0  
        },  
        "translations": [  
          {  
            "text": "赤道几内亚",  
            "to": "zh-Hans"  
          }  
        ]  
      },  
      {  
        "detectedLanguage": {  
          "language": "en",  
          "score": 1.0  
        },  
        "translations": [  
          {  
            "text": "厄立特里亚",  
            "to": "zh-Hans"  
          }  
        ]  
      },  
      {  
        "detectedLanguage": {  
          "language": "en",  
          "score": 1.0  
        },  
        "translations": [  
          {  
            "text": "爱沙尼亚",  
            "to": "zh-Hans"  
          }  
        ]  
      },  
      {  
        "detectedLanguage": {  
          "language": "en",  
          "score": 1.0  
        },  
        "translations": [  
          {  
            "text": "埃塞俄比亚",  
            "to": "zh-Hans"  
          }  
        ]  
      },  
      {  
        "detectedLanguage": {  
          "language": "en",  
          "score": 1.0  
        },  
        "translations": [  
          {  
            "text": "福克兰群岛。",  
            "to": "zh-Hans"  
          }  
        ]  
      },  
      {  
        "detectedLanguage": {  
          "language": "en",  
          "score": 1.0  
        },  
        "translations": [  
          {  
            "text": "德国联邦共和国",  
            "to": "zh-Hans"  
          }  
        ]  
      },  
      {  
        "detectedLanguage": {  
          "language": "en",  
          "score": 1.0  
        },  
        "translations": [  
          {  
            "text": "斐济",  
            "to": "zh-Hans"  
          }  
        ]  
      },  
      {  
        "detectedLanguage": {  
          "language": "en",  
          "score": 1.0  
        },  
        "translations": [  
          {  
            "text": "芬兰",  
            "to": "zh-Hans"  
          }  
        ]  
      },  
      {  
        "detectedLanguage": {  
          "language": "en",  
          "score": 1.0  
        },  
        "translations": [  
          {  
            "text": "台湾",  
            "to": "zh-Hans"  
          }  
        ]  
      },  
      {  
        "detectedLanguage": {  
          "language": "en",  
          "score": 1.0  
        },  
        "translations": [  
          {  
            "text": "波利尼西亚神父",  
            "to": "zh-Hans"  
          }  
        ]  
      },  
      {  
        "detectedLanguage": {  
          "language": "fr",  
          "score": 1.0  
        },  
        "translations": [  
          {  
            "text": "法国",  
            "to": "zh-Hans"  
          }  
        ]  
      },  
      {  
        "detectedLanguage": {  
          "language": "en",  
          "score": 1.0  
        },  
        "translations": [  
          {  
            "text": "法属圭亚那",  
            "to": "zh-Hans"  
          }  
        ]  
      },  
      {  
        "detectedLanguage": {  
          "language": "en",  
          "score": 1.0  
        },  
        "translations": [  
          {  
            "text": "加蓬共和国",  
            "to": "zh-Hans"  
          }  
        ]  
      },  
      {  
        "detectedLanguage": {  
          "language": "en",  
          "score": 1.0  
        },  
        "translations": [  
          {  
            "text": "冈比亚",  
            "to": "zh-Hans"  
          }  
        ]  
      },  
      {  
        "detectedLanguage": {  
          "language": "en",  
          "score": 1.0  
        },  
        "translations": [  
          {  
            "text": "格鲁吉亚",  
            "to": "zh-Hans"  
          }  
        ]  
      },  
      {  
        "detectedLanguage": {  
          "language": "en",  
          "score": 1.0  
        },  
        "translations": [  
          {  
            "text": "加纳",  
            "to": "zh-Hans"  
          }  
        ]  
      },  
      {  
        "detectedLanguage": {  
          "language": "en",  
          "score": 1.0  
        },  
        "translations": [  
          {  
            "text": "直布罗陀",  
            "to": "zh-Hans"  
          }  
        ]  
      },  
      {  
        "detectedLanguage": {  
          "language": "en",  
          "score": 1.0  
        },  
        "translations": [  
          {  
            "text": "希腊",  
            "to": "zh-Hans"  
          }  
        ]  
      },  
      {  
        "detectedLanguage": {  
          "language": "en",  
          "score": 1.0  
        },  
        "translations": [  
          {  
            "text": "格陵兰",  
            "to": "zh-Hans"  
          }  
        ]  
      },  
      {  
        "detectedLanguage": {  
          "language": "en",  
          "score": 1.0  
        },  
        "translations": [  
          {  
            "text": "格林纳达",  
            "to": "zh-Hans"  
          }  
        ]  
      },  
      {  
        "detectedLanguage": {  
          "language": "en",  
          "
    
    0 comments No comments

  2. Nemo 1 Reputation point
    2022-08-31T15:42:16.95+00:00

    I found it that Azure Translator also translate those double quotes(from " to “ and ”) if i set the target language as zh-Hans. “ and ” are Chinese characters.

    And if i set the target language as Arabic, the transltion result as below:

    "[{"نص":65},{"نص":" "},{"نص":"أبو ظبي"},{"نص":"أفغانستان"},{"نص":"ألبانيا"},{"نص":"ألديرني"},{"نص":"الجزائر"},{"نص":"ساموا الأمريكية"},{"نص":"أندورا"},{"نص":"أنغولا"}]"

    I guess it should be because the text I passed into the api was not correctly formated. the format woks fine in rest api test tool. but it doesn't work in the nodejs api. I guess this is the problem.

    body: [  
      {  
        text: text_src,  
      },  
    ],
    

  3. Nemo 1 Reputation point
    2022-08-31T16:57:08.437+00:00

    I also tried

    curl -X POST "https://api.cognitive.microsofttranslator.com/translate?api-version=3.0&from=en&to=zh-Hans" -H "Ocp-Apim-Subscription-Key:?my key?" -H "Ocp-Apim-Subscription-Region:canadacentral" -H "Content-Type: application/json; charset=UTF-8" -d "[{'Text':'Hello'},{'Text':'World.'}]". it works.

    So, it's very clear now. the issue is from the nodejs api. how the request lib format and use the first parameter, options.