Translating comments and region names into source code

Does anyone know about a batch processor or VS 2010 / script plugin that will allow me to translate comments and region names from Chinese to English?

The only ones I found either process all the lines, or only one line at a time.

I have two large C # projects that I am trying to read.

Thanks.

+7
source share
3 answers

Use PrepTags to prepare the file for translation. This will allow you to select the text to be translated based on the regular expression.

www.preptags.com

You can work with a file by file for free or process files as batch using the pro version (€ 39)

In your case, it is quite simple to prepare. You simply mark everything as protected, then remove protection with comments and region names.

Disclosure: I am developing PrepTags.

+1
source

As noted, you can use the Google Translate API or, alternatively, the Bing Translator API. You can detect comments and regions in your files using System.CodeDom.

0
source

I am not sure if this is possible. You can do the following: 1) Make sure that both C # projects have the "Properties> Create> XML Document File" checkbox. 2.1) Write an application that reads in the generated XML file. 2.2) Parse the file and make a call to Google Translate for each value to get the translated value. 2.3) Put the translated value in another xml file that has the same structure as that created when creating the project.

This would not solve your desire to translate the names of the regions, but this is the beginning. At least you will have intelligence when using two projects.

This is actually a good idea for a small open source project. I can solve it. If so, I will let you know.

0
source

All Articles