A demonstration of internationalization (i18n) features in Python, showcasing multiple language support, pluralization rules, and string interpolation.
- 🌐 Multi-language support (English, Spanish, Chinese)
- 📝 Pluralization rules demonstration
- 🔄 String interpolation with variables
- 📅 Date and time formatting
- 💰 Currency formatting
- 📦 Simple and clean implementation using Python i18n package
- 📝 Translation files are in JSON format
- Extendible to more languages
- Clone the repository:
git clone https://github.com/ysskrishna/python-i18n-showcase.git
cd python-i18n-showcase
- Create and activate a virtual environment (recommended):
python -m venv venv
# On Windows
venv\Scripts\activate
# On macOS/Linux
source venv/bin/activate
- Install dependencies:
pip install -r requirements.txt
Run the demonstration:
python app.py
.
├── app.py # Main application file
├── translations/ # Translation files
│ ├── en.json # English translations
│ ├── es.json # Spanish translations
│ └── zh.json # Chinese translations
├── output.log # Log file containing console output
├── requirements.txt # Project dependencies
└── README.md # This file
Contributions are welcome! Feel free to:
- Add more language support
- Improve translation structures
- Add more complex pluralization rules
- Enhance documentation
This project is licensed under the MIT License - see the LICENSE file for details.
Author: ysskrishna