生成本地化 javadoc
我想知道是否有一种生成本地化 javadoc 的简单方法:我想翻译(例如法语)标题和关键字,而不是 html 中的“return”、“parameter”、“class”。
I would like to know if there was a simple way of generating localized javadoc : I would like to have translated (for example in french) title and keywords instead of "return", "parameter", "class" in the html.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
正如 Matt Ball 所说,您可以向 javadoc 提供
-locale
选项来影响某些事情。问题在于,tools.jar 仅包含默认的英语以及另外一种日语 (ja
) 和一种中文 (cn_ZH
) 翻译。我刚刚尝试了中文版,它有效:它写的是发送:JSchException,而不是Throws:JSchException。
因此,您必须将这些内容翻译成您的语言(如果您不想要其中之一)。
几年前,我为当时的版本(1.2 或此类)创建了这些资源的世界语翻译,如果您有兴趣,我可以将它们挖掘出来。 (但现在他们似乎正在使用另一种格式。)
As said by Matt Ball, you can provide the
-locale
option to javadoc to influence some things. The problem is that tools.jar only contains the default English and additionally one Japanese (ja
) and one Chinese (cn_ZH
) translation.I just tried the Chinese one, and it works: it writes 抛出: JSchException instead of Throws: JSchException.
So you would have to translate these to your language (if you don't want one of these).
Some years ago I created an Esperanto translation of those resources for the then-current version (1.2 or such), if you are interested I could dig them out. (But it seems now they are using another format.)
有javadoc
-locale< /code>
选项,尽管我不确定它是否会更改
return
和class
等关键字。 Java 中只有一组非本地化的关键字,因此我认为无论如何更改 JavaDoc 中的这些关键字是没有意义的。There is the javadoc
-locale
option, though I'm not sure that it changes keywords likereturn
andclass
. There is only one, non-localized set of keywords in Java, so I don't think it makes sense to alter those in the JavaDocs anyway.