locked
Translation Using Country Code Using Bing Translation API RRS feed

  • Question

  • Hi,

    We are using Bing Translation API from the Microsoft. We have two languages ( fr-CA and fr-FR ) which we want
     to translate from en-US. Currently in the translation API we can only pass the language code and not the country code for the translation. But these two are different ( fr-CA and fr-FR ) languages and should have different translation.

    But in the API we can only pass fr so translation for the both the language ( fr-CA and fr- FR ) will remain same.
    Bing translation API supports zh-CHS and we can pass CHS with the language code in the API.

    So is there any way that we can translate using country code also using Bing Translation API?

    Thanks for any help.



    Thursday, September 18, 2014 10:17 AM

All replies

  • Hi Manish,

    you can use the fully qualified language identifier with country code (fr-fr, fr-ca), but it won't have an effect for French, you will get the same translation in both cases.

    Let us know if this covers your question.

    Chris Wendt
    Microsoft Translator

    Friday, September 19, 2014 1:27 AM
  • Hi Chris, Thanks for your response.

    We are using below method and it not allowed us to pass fr-fr or fr-ca.

    mLanguageCode = "fr-ca";

    DataServiceQuery<Translation> tQuery = mTranslator.Translate(textToTranslate, mLanguageCode, "en"); var tList = tQuery.Execute().ToList();

    But since it would not effect the translation and translation will remain same even I pass them ( fr-ca or fr-fr ).

    So using Bing translation API, we can not translate using country code. right?

    If so, can this feature be added to API?

    Thanks.


    Friday, September 19, 2014 6:29 AM
  • Hi Manish,

    if you are using the Microsoft Translator API at the end point api.microsofttranslator.com, and documented here: http://aka.ms/translatormsdn, you can use the fully qualified language ID, with country code.

    Hope this helps,
    Chris Wendt
    Microsoft Translator

    Friday, September 19, 2014 3:56 PM
  • Thanks Chris

    I followed http://aka.ms/translatormsdn and here I registered the application and get the client id and secret key for translation. I was able to pass the country code with the language code in the code.

    But it is not differentiating in fr-fr and fr-ca. The translation is same for both of these.

    So, I assume that this is not a supported feature form the Microsoft Translator API?

    Monday, September 22, 2014 7:36 AM
  • Hi Manish,

    that is correct: the API accepts the different language identifiers, but the translation will be the same.

    Chris Wendt
    Microsoft Translator

    Monday, September 22, 2014 4:38 PM