如何本地化.NET库的文档 [英] How to localize the documentation of a .NET library

查看:142
本文介绍了如何本地化.NET库的文档的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个开源项目( here ),其中文档目前为法语。该文档是使用Sandcastle从代码中的XML注释生成的。现在我想将文档翻译成英语,并提供两种语言的文档,但我不太了解从哪里开始...

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...


  • 我需要从代码中提取XML注释并将它们放在一个单独的文件中吗?如果是,是否有任何工具自动化过程?

  • 我正在使用Sandcastle帮助文件生成器来构建文档;我需要创建一个单独的项目来构建英文文档,还是可以从同一个项目中完成?

  • 是否有任何帮助翻译过程的工具?例如显示原始和翻译的文档并行?

我也对如何制作多语言文档的链接感兴趣,因为我可以在Google上找不到任何有用的东西...

I'm also interested in links on how to produce multilingual documentation, as I couldn't find anything useful on Google...

推荐答案

一个策略,需要与Sandcastle XSLT文件进行协调,要在XML文档中使用 xml:lang 属性。 Visual Studio 2010允许保留多个标签(尽管您可能会收到有关重复标签的投诉)。

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;
}

结果输出:

<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>

这篇关于如何本地化.NET库的文档的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆