生成本地化的Javadoc [英] Generate localized 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.
推荐答案
正如Matt Ball所说,可以为Javadoc提供-locale
选项以影响某些事情.问题在于tools.jar仅包含默认的英语,另外还包含一个日语(ja
)和一个中文(cn_ZH
)的翻译.
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.
我刚刚尝试了中文版本,它的工作原理是:它编写引发:JSchException 而不是 Throws:JSchException .
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).
几年前,我为当时的最新版本(1.2左右)创建了这些资源的世界语翻译,如果您有兴趣的话,我可以将其挖掘出来. (但现在看来他们正在使用另一种格式.)
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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!