# Multi-i18n **Repository Path**: ChesterLeeRepo/multi-i18n ## Basic Information - **Project Name**: Multi-i18n - **Description**: This repo generates API files for multiple programming languages based on YAML files. 🎯 Simplifies multilingual text management for your software. 🌍 Ensures global accessibility. 💻 - **Primary Language**: Python - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-01-02 - **Last Updated**: 2025-02-26 ## Categories & Tags **Categories**: Uncategorized **Tags**: Python, i18n, Generator ## README # multi_i18n - Multi-language Support for Internationalization This repo generates API files for multiple programming languages based on YAML files. 🎯 Simplifies multilingual text management for your software. 🌍 Ensures global accessibility. 💻 ## Architecture ### 1. Multi-Language Resource Multi-language contents are stored in **YAML** files. Each YAML file correspond to one language, such as en-GB, zh-CH. ### 2. Core Library - Use **Strategy** pattern && **Simple Factory** pattern to design this module - Yaml parser - Language store - Language manager ### 3. API Generator - Generate API with target language according to YAML files - Target language contains C, Python, ... ... ## Install & Run the Script ### Environment Required - Python>=3.9.6 - Others see [requirements.txt](./requirements.txt) ### Generate Code Generate all support programming language: ```bash ./dist/multi_i18n.exe main.py --yaml-dir ./translations --output-dir ./generated ``` Generate specified programming language: ```bash ./dist/multi_i18n.exe --yaml-dir ./translations --output-dir ./generated --languages c ``` ## API - [C](./API/C.md) ## TODO - [ ] Adding relative path has some bugs - [ ] Support counting the number of strings - [ ] Support generating code for Python ## Contribution If you have any suggestions or improvements, please make sure to create a new issue or pull request. And test the code before submitting. See [test](./tests/test.md) for more test information. ## Reference - [*GNU gettext*](https://www.gnu.org/software/gettext/) - [*lv_i18n - Internationalization for LittlevGL*](https://github.com/lvgl/lv_i18n) ## License The scripts and documentation in this project are released under the [Apache License](./LICENSE)