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

How to add the language of my country? #1215

Open
unitwk opened this issue May 13, 2024 · 0 comments
Open

How to add the language of my country? #1215

unitwk opened this issue May 13, 2024 · 0 comments
Assignees
Labels

Comments

@unitwk
Copy link
Member

unitwk commented May 13, 2024

MCSManager now supports languages from several countries:

https://github.com/MCSManager/MCSManager/tree/master/languages

Due to insufficient manpower, many translation files have been completed using ChatGPT or Google Translate. If you find any translations inadequate, you can submit a pull request for any language file.


If you want to add your own country's language, there are several prerequisites:

  1. The language must be written from left to right.
  2. The native speakers must exceed thirty million.
  3. Everyday news or data in this language must be searchable on the Internet.
  4. Proficiency in Vue.js, Typescript (optional).

Why these prerequisites?

Because every time we add a new language, it permanently increases the development cost for developers. Therefore, we hope this software can be used by people of any language, but in reality, we don't have enough time to cover them all.


If the language you want to add meets these prerequisites and you are willing to help with the translation, you are welcome to submit a pull request.

  1. Fork our GitHub repository.
  2. Add your language file in /languages (e.g., fr_FR.json).
  3. Based on en_US.json, translate the content into your language file and then submit it to us.

If you are a developer, you can start MCSManager development mode to see the language file changes in real time.

Reference: https://github.com/MCSManager/MCSManager?tab=readme-ov-file#development

Next, import your language file in these places, following the existing language code:

Daemon: https://github.com/MCSManager/MCSManager/blob/master/daemon/src/i18n/index.ts

Web Backend: https://github.com/MCSManager/MCSManager/blob/master/panel/src/app/i18n/index.ts

Web Frontend: https://github.com/MCSManager/MCSManager/blob/master/frontend/src/lang/i18n.ts#L10

After this, you should be able to see the changes to the language files in real time.

@unitwk unitwk added the Notice label May 13, 2024
@unitwk unitwk self-assigned this May 13, 2024
@unitwk unitwk pinned this issue May 13, 2024
@MCSManager MCSManager locked and limited conversation to collaborators May 13, 2024
@unitwk unitwk changed the title How to add your own language? How to add your country's language? May 13, 2024
@unitwk unitwk changed the title How to add your country's language? How to add the language of my country? May 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant