os.environ does not have LANGUAGE in Centos8.#544
os.environ does not have LANGUAGE in Centos8.#544mattrose merged 2 commits intognome-terminator:masterfrom jexShain:master
Conversation
|
According to my reading, LANGUAGE and LANG are two slightly different variables with slightly different purposes and LANGUAGE is present on other linuxes. I'd much rather use LANG as a fallback if LANGUAGE doesn't exist, rather than replacing LANGUAGE with LANG entirely |
|
What you said is very reasonable, so I will add Lang as a judgment. Is it appropriate?If you think so, I will continue to revise it. |
|
This is ... closer, but LANG should only ever return one element. LANGUAGE returns a colon separated list, but LANG only ever returns one language. You should be able to just use the string that split returns. so something like: |
|
just another Q: What does |
|
Thank you for your advice. I have revised the language selection again to facilitate the expansion of the website language in the future. Running in my environment on CentOS 8 is zh_ CN is en after changing the English is en_US.Also on Debian, language is zh_ CN. |
|
Looks good, thank you! |
There is no LANGUAGE available on environ of centos, so there is no way to select a new LANGUAGE, even though only English is available.