Translations¶
Educator Tools supports multiple languages to make the add-on accessible to educators and students worldwide. This guide explains how to add or improve translations for the project.
Current Translation System¶
The translation system is located in the main repository under:
regolith/filters_data/modular_mc/educator_tools/translations/
Each language is represented by a .lang file named with the appropriate locale code (e.g., en_US.lang, it_IT.lang, fr_FR.lang).
Adding a New Translation¶
Step 1: Set Up Your Development Environment¶
Before adding translations, make sure you have:
- Forked and cloned the main repository (see Contributing Guide)
- Set up the development environment with all dependencies
Step 2: Create the Translation File¶
- Navigate to the translations directory:
cd regolith/filters_data/modular_mc/educator_tools/translations
- Copy the base English file:
Replace
cp en_US.lang your_locale.langyour_localewith the appropriate language code: it_IT.langfor Italian (Italy)es_ES.langfor Spanish (Spain)fr_FR.langfor French (France)de_DE.langfor German (Germany)pt_BR.langfor Portuguese (Brazil)- And so on...
Step 3: Translate the Content¶
-
Open your new language file in your preferred text editor.
-
Translate the strings while keeping the keys unchanged:
# Example structure:
educator_tools.ui.timer.start=Start Timer
educator_tools.ui.timer.stop=Stop Timer
Important: Only translate the text after the = sign. The keys (before =) must remain in English.
- Maintain consistency with UI terminology and keep translations concise to fit UI elements.
Step 4: Test Your Translation¶
-
Build the project using one of the methods described in the Contributing Guide.
-
Test in Minecraft Education by:
- Installing the compiled add-on
- Changing your Minecraft language settings to match your translation
- Verifying that translated text appears correctly in the UI
Step 5: Submit Your Translation¶
- Commit your changes:
Using Command Line¶
git add regolith/filters_data/modular_mc/educator_tools/translations/your_locale.lang
git commit -m "Add [Language Name] translation (your_locale)"
Using GitHub Desktop¶
- Open GitHub Desktop and make sure your repository is selected
- Review your changes in the "Changes" tab - you should see your new
.langfile listed - Write a commit message in the "Summary" field (e.g., "Add Italian translation (it_IT)")
- Add a description (optional) explaining any specific translation choices
-
Click "Commit to main" to save your changes locally
-
Push to your fork:
Using Command Line¶
git push origin main
Using GitHub Desktop¶
- Click "Push origin" in the top bar to upload your changes to your fork on GitHub
-
If this is your first push, GitHub Desktop may prompt you to publish the branch
-
Create a Pull Request following the guidelines in the Contributing Guide.
Improving Existing Translations¶
If you notice errors or want to improve existing translations:
- Edit the appropriate
.langfile in the translations directory. - Test your changes as described above.
- Submit a Pull Request with a clear description of the improvements made.
Translation Guidelines¶
Best Practices¶
- Keep it concise: UI elements have limited space
- Be consistent: Use the same terminology throughout
- Consider context: Some English terms may not translate directly
- Test thoroughly: Verify translations work in the actual Minecraft UI
Common Locale Codes¶
| Language | Locale Code |
|---|---|
| English (US) | en_US |
| English (UK) | en_GB |
| Afrikaans | af_ZA |
| Arabic | ar_SA |
| Bulgarian | bg_BG |
| Catalan | ca_ES |
| Chinese (Simplified) | zh_CN |
| Chinese (Traditional) | zh_TW |
| Czech | cs_CZ |
| Danish | da_DK |
| Dutch | nl_NL |
| Finnish | fi_FI |
| French (France) | fr_FR |
| French (Canada) | fr_CA |
| German (Germany) | de_DE |
| Greek | el_GR |
| Hungarian | hu_HU |
| Indonesian | id_ID |
| Italian (Italy) | it_IT |
| Japanese | ja_JP |
| Korean | ko_KR |
| Norwegian (Bokmål) | nb_NO |
| Polish | pl_PL |
| Portuguese (Brazil) | pt_BR |
| Portuguese (Portugal) | pt_PT |
| Russian | ru_RU |
| Spanish (Spain) | es_ES |
| Spanish (Mexico) | es_MX |
| Swedish | sv_SE |
| Turkish | tr_TR |
| Ukrainian | uk_UA |
Getting Help¶
If you need assistance with translations:
- Check existing translations for reference and consistency
- Ask questions in the project's GitHub Issues
- Review the main Contributing guide for general development setup
Thank you for helping make Educator Tools accessible to more educators and students worldwide! 🌍