Skip to content

Add support for --locale #39

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

Closed
wants to merge 1 commit into from
Closed

Add support for --locale #39

wants to merge 1 commit into from

Conversation

MalsonQu
Copy link

linuxserver.io


  • I have read the contributing guideline and understand that I have made the correct modifications

Description:

Add optional option --locale in file root/etc/services.d/code-server/run to set language for code-server by manual.
This is Available locales
it is very important to Chinese people :D.

Benefits of this PR and context:

easy to change language for code-server

How Has This Been Tested?

just when run image, set env LOCALE like zh-CN, when container started install Language Pack in code-server like Chinese (Simplified) Language Pack for Visual Studio Code. restart the container will see language changed to Simplified chinese

Source / References:

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for opening this pull request! Be sure to follow the pull request template!

@aptalca
Copy link
Member

aptalca commented Nov 13, 2020

Thanks for the PR, but can't you change the locale in the gui? I mean, all our docs and everything is in English. If someone is able to follow our docs to create the container, I'd assume they would be able to change the locale in the gui?

I'd really like to keep the env vars to a minimum.

@MalsonQu
Copy link
Author

thanks for reply.
I've tried many times

  • Install Language Pack and set Display language to non English. Restart container. It’s display English.
  • Create file argv.json and input option locale. Restart container. It’s display English.
  • Create file locale.json and input option locale. Restart container. It’s display English.

I also not want change env to keep minimum.
But when I change file root/etc/services.d/code-server/run it’s displayed my language.

So I created this pull request.

If have others way to change language. Please tell me. I really need it

@aptalca
Copy link
Member

aptalca commented Nov 14, 2020

It seems to be a code server issue. They have been changing a lot of things lately and the language selection in the gui is not working properly: coder/code-server#215

However, you can change the locale by putting a locale.json file under /config/data/User, which contains all code-server user data (which is where the gui setting should write it, but doesn't)

@MalsonQu
Copy link
Author

MalsonQu commented Nov 14, 2020

Yes! you are right, put file locale.json file under /config/data/User is work. but need lowercase like zh-cn, file content like this

{
    "locale":"zh-cn"
}

Thank you very much

@MalsonQu MalsonQu closed this Nov 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants