tldr-node-client icon indicating copy to clipboard operation
tldr-node-client copied to clipboard

Does configuring TLDR's LANG=zh and TLDR_LANGUAGE=zh on Ubuntu not work? It has always been in English?

Open ruixule opened this issue 11 months ago • 14 comments

As a root user, I added the command in home/admin/. bashrc, but it was still in English and did not take effect at all. The version used is also the latest, but adding lang=zh before the instruction does not take effect

export TLDR_LANGUAGE=zh
export LANG=zh

Image

Image

Image

ruixule avatar Jan 01 '25 00:01 ruixule

Hi. Unfortunately, our maintainers do not speak Chinese, so we kindly ask that you write your issue in English. This will help us assist you more effectively.

spageektti avatar Jan 01 '25 00:01 spageektti

Hi. Unfortunately, our maintainers do not speak Chinese, so we kindly ask that you write your issue in English. This will help us assist you more effectively.

I translated the meaning that needs to be expressed

ruixule avatar Jan 01 '25 00:01 ruixule

Dear friend, are there any friends who have encountered the same problem as me

ruixule avatar Jan 01 '25 12:01 ruixule

Do LANG=zh tldr ps or tldr -L zh ps work for you?

spageektti avatar Jan 01 '25 14:01 spageektti

Do LANG=zh tldr ps or tldr -L zh ps work for you?

Not effective

ruixule avatar Jan 01 '25 14:01 ruixule

Do LANG=zh tldr pstldr -L zh ps work for you?

Not effective

Dear Is there any other way?

ruixule avatar Jan 02 '25 10:01 ruixule

Maybe try LANGUAGE instead of LANG (for me LANG doesn't work). For me testing tldr -L zh ps for different languages works despite not having those locales installed.

hasecilu avatar Jan 02 '25 20:01 hasecilu

Maybe try LANGUAGE instead of LANG (for me LANG doesn't work). For me testing tldr -L zh ps for different languages works despite not having those locales installed.

Screenshot_20250103_073533_com.alibaba.aliyun.jpg

ruixule avatar Jan 02 '25 23:01 ruixule

I meant the environment variable, LANGUAGE=zh tldr ps

hasecilu avatar Jan 02 '25 23:01 hasecilu

I meant the environment variable, LANGUAGE=zh tldr ps

Screenshot_20250103_081646_com.alibaba.aliyun.jpg

ruixule avatar Jan 03 '25 00:01 ruixule

I recommend you to use the Python client, that works for me for any language, very versatile. Give it a try and maybe also works for you.

hasecilu avatar Jan 03 '25 00:01 hasecilu

I recommend you to use the Python client, that works for me for any language, very versatile. Give it a try and maybe also works for you.

how to use it,cloud you give me a example?

ruixule avatar Jan 03 '25 00:01 ruixule

I recommend you to use the Python client, that works for me for any language, very versatile. Give it a try and maybe also works for you.

how to use it,cloud you give me a example?

thanks

ruixule avatar Jan 03 '25 00:01 ruixule

I recommend you to use the Python client, that works for me for any language, very versatile. Give it a try 和 maybe also works for you.

how to use it,cloud you give me a example?

thanks

I have successfully installed this tutorial

https://blog.csdn.net/weixin_41613490/article/details/144918152

ruixule avatar Jan 03 '25 13:01 ruixule

Closing this as the issue appears to be resolved. For future reference, the correct answer was the use/set the LANG environment variable.

$ LANG=zh tldr ip

It would help to confirm the value of this variable by running echo $LANG so we know for sure what the value is before running tldr.

Demos:

$ LANG=zh npm run start ip
> [email protected] start
> node ./bin/tldr ip


  ip

  显示/操作路由、设备、策略路由和隧道。
  一些子命令(例如 address)有自己的使用文档。
  更多信息:https://manned.org/ip.8.

  - 列出带有详细信息的接口:
    ip [a|address]

  - 列出带有简要网络层信息的接口:
    ip [-br a|-brief address]

  - 列出带有简要链路层信息的接口:
    ip [-br l|-brief link]

  - 显示路由表:
    ip [r|route]

  - 显示邻居(ARP 表):
    ip [n|neighbour]

  - 使接口启动/关闭:
    sudo ip [l|link] [s|set] interface up|down

  - 向接口添加/删除 IP 地址:
    sudo ip [a|address] add|delete ip/mask dev interface

  - 添加默认路由:
    sudo ip [r|route] [a|add] default via ip dev interface
$ echo $LANG && npm run start -- ps
zh

> [email protected] start
> node ./bin/tldr ps


  ps

  提供正在运行的进程的信息。
  更多信息:https://manned.org/ps.

  - 列出所有正在运行的进程:
    ps aux

  - 列出所有正在运行的进程,包括完整的命令字符串:
    ps auxww

  - 查找与字符串匹配的进程:
    ps aux | grep 字符串

  - 以 extra full 格式列出当前用户的所有进程:
    ps [-u|--user] $(id [-u|--user]) -F

  - 以树形方式列出当前用户的所有进程:
    ps [-u|--user] $(id [-u|--user]) f

  - 获取一个进程的父进程 ID:
    ps [-o|--format] ppid= [-p|--pid] 进程 ID

  - 按内存使用量对进程进行排序:
    ps --sort size

You might not see it in your language if the page hasn't been translated to that language yet, or if your index is outdated (do tldr --update). In your case, ps was translated at the time, so if one of these are the case, it's more likely that --update hasn't been called for a while.

It may be that if you had just added the LANG lines to .bashrc, it may be that you forgot to source the changes with . ~/.bashrc or source ~/.bashrc?

Though none of these are probably useful for you today, but just noting them for anyone else that may encounter this ticket later.

Thanks to everyone that tried to help though, and sorry we weren't able to help you use this TLDR client, but I'm glad you found another that works for you. 🎉

SethFalco avatar Oct 31 '25 00:10 SethFalco