I have an open-source project (here) whose documentation is currently in French. The documentation is generated from XML comments in code, using Sandcastle. Now I would like to translate the documentation to English and provide documentation in both languages, but I don't really know where to start...
I'm also interested in links on how to produce multilingual documentation, as I couldn't find anything useful on Google...
To opt-in to localization, we need to modify our Startup file. We'll be registering a few services, configuring options, and registering middleware. All steps that are common-place for additions in an ASP.NET application. Starting in our ConfigureServices method, we need to make a call to AddLocalization .
Document localization is a special part of working with documentation when the interpreter translates the document and adapts it to the inhabitants of the target market of the particular country or cultural group.
Localization is the process of customizing your application for a given culture and locale. Cultures and Locales. The language needs to be associated with the particular region where it is spoken, and this is done by using locale (language + location).
One strategy, which would require some coordination with the Sandcastle XSLT files, would be to use the xml:lang
attribute on your XML documentation. Visual Studio 2010 allows multiple tags to remain (although you may get complaints about duplicate tags).
/// <summary> /// Gets or sets the fill size of the load operation. /// </summary> /// <summary xml:lang="fr"> /// Obtient ou définit la taille de remplissage de l'opération de chargement. /// </summary> public int FillSize { get; set; }
Resulting output:
<member name="P:Namespace.MyAttribute.FillSize"> <summary> Gets or sets the fill size of the load operation. </summary> <summary xml:lang="fr"> Obtient ou définit la taille de remplissage de l'opération de chargement. </summary> </member>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With