Tldr: How to change language using a client?

Created on 2 Jul 2019  路  4Comments  路  Source: tldr-pages/tldr

How to Change Language?

clients

All 4 comments

According to the client spec, it is expected that clients will determine what language to show based on the environment variables such as LANG.

@sbrl, wouldn't it make sense to also recommend a --lang or --language CLI argument to switch the language, just like we have --platform to override the auto-detected operating system?

(By the way, maybe we should define versioning for the spec, so that clients can indicate to users exactly what version they support and remain compliant even when future changes to the spec are introduced. What do you guys think?) Silly me, that's already in place.

Hi @liuhaojava, it depends on which client you are currently using. Not many clients support changing language or identifying language at all as of now. The only one which I am aware of is elecprog/tldr. As @waldyrious said, clients should be following the specification, but that's a rather new addition and clients did't have much time to catch up.

@waldyrious Thinking about it, it absolutely would (though you can always do LANG=abc tldr example, but that feels a bit weird). Have any clients actually added multi-language support yet? I think our reference node client is notably lacking support. We've got quite a selection of translated pages to test with now.

I'll open a PR to update the client spec.

Maybe it's worth @mentioning client authors in the PR to make them aware of it.

@liuhaojava - I am going to close this now as your question has been answered. If you want details on a specific client, please feel free to open an issue in that client's repo. Thanks.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dikarel picture dikarel  路  3Comments

Wesalius picture Wesalius  路  3Comments

amitech picture amitech  路  3Comments

FukurouMakoto picture FukurouMakoto  路  3Comments

phpmaple picture phpmaple  路  3Comments