-
Notifications
You must be signed in to change notification settings - Fork 129
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
Add config file option to set prefered language #251
Comments
I am not sure about adding another section just for this, but the general idea of having a setting seems logical :) An implementation will have to make sure to still adhere to the client spec from upstream (where the behavior for |
I'm really not experienced with Rust, but after looking at the code I think this could be implemented by extending dbrgn/tealdeer/src/main.rs#L471 with another
Should this go under |
From a developer perspective, I would see that option in |
@g11v8a This sounds like it would be better fit as a separate issue. Can you open a new one instead? |
After thinking about #335, I think it would make even more sense if the config option wouldn't be "language", but rather "languages", since users might want to always query for multiple languages. This could then use a TOML list instead of just a string. Finally, we could (in a separate PR then) think about allowing both a string or a list in the "language" or "languages" option (or have both?). A natural question following from that is: Should the CLI option also accept multiple languages? I think we could potentially allow for multiple occurrences of |
Upstream official client have different config methods and some of them have none (https://github.com/orgs/tldr-pages/discussions/10796). Also, to complete zed-g idea, it would also be nice to be able to set a fallback language, when the preferred language doesn't exist, so instead of a string this could be an array.
Yes, I agree this could be set in [display]
preferred_languages = [ "fr", "en"]
[updates]
only_languages = [ "fr", "en"] |
I agree this should be in the config. |
Since #96 it is possible to specify a language via the command line argument
-L/--language
, this works quite well. Now I would like to always use a specific language, differing from theLANG
set as an environment variable.I played around with the config file and had a look at the code but it seems to not be supported as a config file option. Would it be possible to add this? I'm imagening something like an additional section in the config file:
And of course: Thank's a lot for tealdeer, it really is charmingly fast and straightforward to use!
The text was updated successfully, but these errors were encountered: