Update the language of documentation created by Sandcastle
Here are the pre-requisits to use Sandcastle documentation:
- Installing Visual Studio 2008 SDK 1.1 or installing Sandcastle accessible at the Sandcastle MSDN site;
- Installing HTML Help Workshop and documentation;
- Commenting all your code with XML Comments.
Sandcastle is the tool for creating a code documentation, you can use the given examples to generate your documentation, everything works fine but all the documentation is in english.
How could I update that to have everything in french for example?
The solution is based on updating the xml files of the content folder of the choosen style.
Here are examples of steps for having your documentation in french:
- Duplicate all files xml files from <SandcastleInstallationDirectory>\Presentation\<Style>\Content\
- Duplicate shared_content.xml as shared_content_FR.xml (main file to translate, mostly everything is here)
- Duplicate reference_content.xml as reference_content_FR.xml
- Duplicate syntax_content.xml as syntax_content_FR.xml
- Translate all the xml content of the new created files;
- Update Sandcastle.config to point to those new files. Update this code:
<!--
Old code -->
<
component type="Microsoft.Ddue.Tools.SharedContentComponent" assembly="%DXROOT%\ProductionTools\BuildComponents.dll">
<
content file="%DXROOT%\Presentation\Prototype\content\shared_content.xml" />
<
content file="%DXROOT%\Presentation\Prototype\content\reference_content.xml" />
<
content file="%DXROOT%\Presentation\Shared\content\syntax_content.xml" />
</
component>
with this code:
<!-- Updated code -->
<component type="Microsoft.Ddue.Tools.SharedContentComponent" assembly="%DXROOT%\ProductionTools\BuildComponents.dll">
<content file="%DXROOT%\Presentation\Prototype\content\shared_content_FR.xml" />
<content file="%DXROOT%\Presentation\Prototype\content\reference_content_FR.xml" />
<content file="%DXROOT%\Presentation\Shared\content\syntax_content_FR.xml" />
</component>
Now you just have to try.
BenoƮt
Comments
- Anonymous
December 18, 2009
Thanks for the tip, I was desperately looking for a solution... Note that the syntax_content.xml file doesn't exist anymore in the current version of Sandcastle.Can I find "official" translated reference files somewhere ?