Share via


Update the language of documentation created by Sandcastle

Here are the pre-requisits to use Sandcastle documentation:

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:

  1. Duplicate all files xml files from <SandcastleInstallationDirectory>\Presentation\<Style>\Content\
    1. Duplicate shared_content.xml as shared_content_FR.xml (main file to translate, mostly everything is here)
    2. Duplicate reference_content.xml as reference_content_FR.xml
    3. Duplicate syntax_content.xml as syntax_content_FR.xml
  2. Translate all the xml content of the new created files;
  3. 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 ?