Need suggestion on managing multiple language documents

Topics: User Forum
Sep 8, 2008 at 3:12 PM
Hi,

In my project, I need to provide multiple languages of documents. We embeded the english xml comments in the code, and the builder works great. But for other languages, we have to copy the english xml to another place, localize it. The problem is, when we change a method(e.g. add a parameter), the compiler will tell us to update the xml comments, but won't handle the copied localized xmls, we have remeber to merge the updates. Do you have any guidelines or suggestions for this situation?

Thanks,
Luther
Sep 9, 2008 at 12:07 AM
Hello Luther,
The best way is to use external comment files and the include tag for both the English and other languages.
There are some tools are Codeproject.com to help you extract the embedded comments to an external
files for you to use the include tag on existing codes.
Normally you start documenting after you freeze the codes for release to avoid such effects from changes.

Best regards,
Paul.
Sep 9, 2008 at 7:25 PM
Thanks for your comments. Could you let me know the tool name you mentioned?

And regarding the include tag, it also only can refer to one external xml comment file for one language, right?
e.g. if I need to generate documents for 2 languages, so I have two external xml files:
LanguageA.xml, LanguageB.xml
and add a include tag in the c# code file, something like:
<include file=LanguageA.xml'/>
How about LanguageB?

Thanks,
Luther
Sep 13, 2008 at 12:47 PM
>>Luther: Thanks for your comments. Could you let me know the tool name you mentioned?
Sorry for the delay, I did not received any notifications. The tool was posted on Codeproject as VS.NET addin,
I do not know the name, I will try to search.

>>Luther: And regarding the include tag, it also only can refer to one external xml comment file for one language, right?
No, normally you create a file for each code file, say for Sample.cs, you have Sample.xml. These files are all stored in the same
folder say \XmlDocs for each project.
You can then have the files in the \XmlDocs translated but with the same naming Sample.xml. You can name the translated folder
by any name, and when you are ready to use a language just replace the English XmlDocs with the other language XmlDocs,
giving it the same name XmlDocs and compile. You can add Pre and Post build steps to your project to handle this automatically
when you select a configuration or use custom MSBuilds tasks to handle it.
Since you are compiling in each case, the compiler will check the basic syntax errors for you.

Best regards,
Paul.