Skip to content

proposal: cmd/go: add language localization support to go doc #57254

@Sunshine40

Description

@Sunshine40

Think of this scenario:

I’m working on a go package, which is intended to be open-source. But the original dev team consists of native Chinese speakers only.
Meanwhile, I hope the package can be used by developers around the globe, and get feedbacks/contributions from them.
In what language should I write the comments (which would be auto-documented by the go doc cmd) then?

You see, the goal of development efficiency and documentation for potential users who speak different languages contradict each other, when it comes to deciding a single language to be used in go doc comments.

Using English in go doc comments from the beginning of a project is an option, chosen by a number of developers who are not native English speakers. But it would break the internal usage of comments, especially when members of the dev team might not be fluent in English.
“Restricting go doc comments to English text” as a coding style guide may lead to most developers leave the comment sections untouched, resulting in outdated or absent documentation.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions