Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Support for localization of messages #540

Closed
7 tasks done
toniwiki opened this issue Jan 28, 2023 · 1 comment
Closed
7 tasks done

Support for localization of messages #540

toniwiki opened this issue Jan 28, 2023 · 1 comment
Labels
question Question or problem

Comments

@toniwiki
Copy link

First Check

  • I added a very descriptive title to this issue.
  • I used the GitHub search to find a similar issue and didn't find it.
  • I searched the Typer documentation, with the integrated search.
  • I already searched in Google "How to X in Typer" and didn't find any information.
  • I already read and followed all the tutorial in the docs and didn't find an answer.
  • I already checked if it is not related to Typer but to Click.

Commit to Help

  • I commit to help with one of those options 👆

Example Code

python -m my-cli-app --help

Description

I am interested in creating a CLI application with Typer that supports multiple languages. To do this I want to be able to localize automatically generated default strings in help, error messages, etc.

I am new to Typer (and Python in general) but I think I understand that Click is the one that wraps the internal strings with gettext. However, it is not clear to me how I can change the default messages from Typer.

Could someone give me a simple example of how to do it?

Thanks

Operating System

Linux

Operating System Details

No response

Typer Version

0.7.0

Python Version

3.10.9

Additional Context

No response

@toniwiki toniwiki added the question Question or problem label Jan 28, 2023
@svlandeg
Copy link
Collaborator

Hi! As this is a usage question, let me move this thread to the discusssion forum.

Repository owner locked and limited conversation to collaborators Mar 19, 2024
@svlandeg svlandeg converted this issue into discussion #753 Mar 19, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
question Question or problem
Projects
None yet
Development

No branches or pull requests

2 participants