Translating resource files RRS feed

  • Question

  • I'm developing an internationalised app that stores its strings in resource files.  in looking to translate these into other languages I've found little or no support, thus I've written a Powershell script (see: https://github.com/ekkis/Powershell/blob/master/MT.ps1) that integrates into Visual Studio and does the translations.

    it was my naive hope that I could just hand Microsoft Translator the contents of the file (xml format) and be done with it, but there are a number of problems:

    1. there seems to be a character limit of 10241, which requires I break up the file into chunks to be translated separately

    2. the translator seems to understand xml i.e. if I hand it "<root>" it returns to me "<root></root>" - which means that in concatenating the chunks of the resource file, I get extra closing tags and the resource won't compile.

    I hate to think I'm going to have to read the xml, extract the contents within tags and translate each separately, but perhaps that's what I'll need to do.  could someone here suggest a better path?

    thanks i advance,


    Do what thou wilt shall be the whole of the law -- AL. I. 40

    Sunday, August 23, 2015 10:02 PM

All replies

  • Hi Ekkis,

    For translation in Visual Studio try MAT: Multilingual App Toolkit:


    Indeed when using HTML mode (contentType=text/HTML) then the chunk of HTML passed in needs to be a well- formed, complete element. Note that the API understands only HTML, and makes assumptions about which tags are sentence breaking and which ones are sentence-internal, an important distinction. When using plain text mode the tags may be reordered illegally, and you can safely use only simple tags without attributes.

    Best in your case is to do your own parsing and translate plain text as plain text.

    Thanks for publishing your script!

    Chris Wendt
    Microsoft Translator

    Wednesday, August 26, 2015 1:56 AM
  • Hi Ekkis,

    one more suggestion: can you write your resource translator as a file format for document translator?


    Would be great. Maybe we can even integrate better number handling...

    Chris Wendt
    Microsoft Translator

    Wednesday, August 26, 2015 2:16 AM