The Wayback Machine - https://web.archive.org/web/20201130165040/https://github.com/spf13/cobra/issues/1134
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multi-language support for CLIs? #1134

Open
thomasgloe opened this issue Jun 11, 2020 · 5 comments
Open

Multi-language support for CLIs? #1134

thomasgloe opened this issue Jun 11, 2020 · 5 comments

Comments

@thomasgloe
Copy link

@thomasgloe thomasgloe commented Jun 11, 2020

I would like to support multiple languages for my CLI using cobra. Implementation for commands is no problem, but is it correct that there is currently no support for the text output generated by cobra itself (e.g., "Usage", "Flags", "Use "mycmd [command] --help" for more information about a command.")?

@BunnyBrewery
Copy link

@BunnyBrewery BunnyBrewery commented Jun 20, 2020

Are you talking about if there is multi-language support for default help message in Cobra?

@thomasgloe
Copy link
Author

@thomasgloe thomasgloe commented Jun 22, 2020

Yes and I've already checked the source code, where strings are encapsulated in the UsageTemplate. The way to go seems to change the usage template with SetUsageTemplate.

If I have enough time, would it be of interest to include a small example in the docs?

@github-actions
Copy link

@github-actions github-actions bot commented Aug 22, 2020

This issue is being marked as stale due to a long period of inactivity

@github-actions github-actions bot added the kind/stale label Aug 22, 2020
@jharshman jharshman self-assigned this Sep 24, 2020
@jharshman
Copy link
Collaborator

@jharshman jharshman commented Sep 24, 2020

@thomasgloe I'd be interested to see a PR for this if you wanted to take a shot at it.

@github-actions
Copy link

@github-actions github-actions bot commented Nov 24, 2020

This issue is being marked as stale due to a long period of inactivity

@github-actions github-actions bot added the kind/stale label Nov 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.