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

Support multiple languages #96

Closed
codesections opened this issue Dec 27, 2019 · 3 comments
Closed

Support multiple languages #96

codesections opened this issue Dec 27, 2019 · 3 comments

Comments

@codesections
Copy link

tealdeer currently fetches all languages from the tldr.sh API. However, it only ever displays English documentation. It seems that tealdeer should offer a flag/config option that would display documentation from other languages, when available. (Or maybe it should read the $LANG environmental variable?)

Alternatively, if tealdeer is not going to display non-English documentation, it probably should not save the non-English docs in the user's cache (since they take up space without providing any benefit).

In an ideal world, tealdeer would offer a user the option of selecting their language(s) before downloading the cache, but that seems like a lower priority.

@dbrgn dbrgn changed the title Non-English documentation downloaded but never displayed Support multiple languages Dec 27, 2019
@dbrgn
Copy link
Collaborator

dbrgn commented Dec 27, 2019

Yep, multilingual tldr pages are newer than tealdeer.

Would be nice to support all languages.

@dbrgn
Copy link
Collaborator

dbrgn commented Feb 28, 2020

Actually, since tealdeer already supports the entire tldr pages repo, all languages will already be part of the cache (in $XDG_CACHE_HOME/tealdeer/tldr-master/).

What would be required:

  • Add a config option to set the desired language
  • If a page in that language exists, show it, otherwise fall back to the non-translated pages
  • Add a command line argument (-L/--language) to override the language

@dbrgn dbrgn added this to the v1.4.0 milestone Feb 28, 2020
@dbrgn
Copy link
Collaborator

dbrgn commented Feb 28, 2020

Ah, there is a language resolution spec here: https://github.com/tldr-pages/tldr/blob/master/CLIENT-SPECIFICATION.md#language We should probably adhere to it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

2 participants