如何更改Javadoc使用的语言?

发布于 2025-02-04 05:29:13 字数 155 浏览 4 评论 0原文

生成Javadoc

javadoc Main.java

我试图使用命令行工具(即::最终的文档对我来说是中文)

。说英语我该如何更改语言?

I tried to generate javadoc using the command line tool, i.e.:

javadoc Main.java

But the resulting documentation is in Chinese for me.

How can I change the language to, lets say English?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

梦晓ヶ微光ヅ倾城 2025-02-11 05:29:13
javadoc -locale en_US Main.java

请参阅官方文档命令。

特别是有关-locale选项的部分:

-locale名称

指定Javadoc工具生成文档时使用的语言环境。该参数是java.util.locale 文档,例如 en_us (英语,美国)或 en_us_us_us_win (Windows变体)。

指定一个语言环境会导致Javadoc工具选择该语言环境的资源文件,例如导航栏中的字符串,列表和表格的标题,帮助文件内容, stylesheet.css 文件,依此类推。它还指定按字母顺序排序的列表的排序顺序,以及确定第一个句子的末尾的句子分离器。 -locale选项未确定文档注释文本的本地化文本文本。

javadoc -locale en_US Main.java

See the official documentation of the command.

In particular the section about the -locale option:

-locale name

Specifies the locale that the javadoc tool uses when it generates documentation. The argument is the name of the locale, as described in java.util.Locale documentation, such as en_US (English, United States) or en_US_WIN (Windows variant).

Specifying a locale causes the javadoc tool to choose the resource files of that locale for messages such as strings in the navigation bar, headings for lists and tables, help file contents, comments in the stylesheet.css file, and so on. It also specifies the sorting order for lists sorted alphabetically, and the sentence separator to determine the end of the first sentence. The -locale option doesn't determine the locale of the documentation comment text specified in the source files of the documented classes.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文