Release v1.1.0#
Release Date: TBD
This release adds comprehensive internationalization (i18n) support to sphinx-exercise, enabling the extension to display exercise and solution labels in 27 different languages.
✨ New Features#
Internationalization Support#
The extension now supports 27 languages with automatic language detection:
East Asian: Chinese (zh_CN), Japanese (ja), Korean (ko)
South Asian: Bengali (bn), Hindi (hi), Tamil (ta)
Middle Eastern: Arabic (ar), Turkish (tr)
European: Czech (cs), Dutch (nl), French (fr), German (de), Greek (el), Hungarian (hu), Italian (it), Norwegian (no), Polish (pl), Portuguese (pt), Romanian (ro), Russian (ru), Spanish (es), Swedish (sv), Ukrainian (uk)
Southeast Asian: Indonesian (id), Malay (ms), Vietnamese (vi)
Automatic Language Detection#
The extension automatically detects your Sphinx project’s language configuration and applies the appropriate translations:
# conf.py
language = 'zh_CN' # Chinese
# _config.yml (Jupyter Book)
sphinx:
config:
language: ja # Japanese
Translation Examples#
With language configured, directive labels automatically translate:
Spanish: “Exercise” → “Ejercicio”, “Solution to” → “Solución a”
Chinese: “Exercise” → “练习”, “Solution to” → “解答”
Japanese: “Exercise” → “練習”, “Solution to” → “解答”
French: “Exercise” → “Exercice”, “Solution to” → “Solution de”
German: “Exercise” → “Übung”, “Solution to” → “Lösung zu”
Arabic: “Exercise” → “تمرين”, “Solution to” → “الحل لـ”
Hindi: “Exercise” → “अभ्यास”, “Solution to” → “समाधान”
👌 Improvements#
JSON-based translations: Source translations stored in easy-to-edit JSON format
Alphabetical organization: All language entries sorted alphabetically for maintainability
Automated build process: Script to generate
.poand.mofiles from JSON sourcesEnhanced documentation: Comprehensive guides for using and contributing translations
📚 Documentation Updates#
Added internationalization section to syntax guide
Updated README with i18n feature highlights
Created releases documentation structure
Enhanced translation README with contribution workflow
Added Copilot instructions for maintainers
🛠️ Infrastructure#
Added
.github/copilot-instructions.mdfor project maintenance guidelinesCreated
docs/releases/structure for release documentationImproved translation contribution workflow
🙏 Contributing Translations#
We welcome contributions for additional languages or improvements to existing translations!
Translation files are maintained in sphinx_exercise/translations/jsons/ as JSON files for easy editing. See the translation guide for details on how to contribute.
📦 Installation#
Install or upgrade via pip:
pip install --upgrade sphinx-exercise
For development installation:
git clone https://github.com/executablebooks/sphinx-exercise
cd sphinx-exercise
pip install -e .