https://github.com/ysskrishna/python-i18n-showcase
A demonstration of internationalization (i18n) features in Python, showcasing multiple language support, pluralization rules, and string interpolation.
https://github.com/ysskrishna/python-i18n-showcase
currency-formatting date-time-formatting i18n internationalization json l10n localization localize python string-interpolation translation
Last synced: 4 months ago
JSON representation
A demonstration of internationalization (i18n) features in Python, showcasing multiple language support, pluralization rules, and string interpolation.
- Host: GitHub
- URL: https://github.com/ysskrishna/python-i18n-showcase
- Owner: ysskrishna
- License: mit
- Created: 2025-02-15T12:43:15.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2025-02-15T13:06:02.000Z (4 months ago)
- Last Synced: 2025-02-15T14:19:18.880Z (4 months ago)
- Topics: currency-formatting, date-time-formatting, i18n, internationalization, json, l10n, localization, localize, python, string-interpolation, translation
- Language: Python
- Homepage:
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# python-i18n-showcase
A demonstration of internationalization (i18n) features in Python, showcasing multiple language support, pluralization rules, and string interpolation.
## Features
- 🌐 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## Installation
1. Clone the repository:
```bash
git clone https://github.com/ysskrishna/python-i18n-showcase.git
cd python-i18n-showcase
```2. Create and activate a virtual environment (recommended):
```bash
python -m venv venv
# On Windows
venv\Scripts\activate
# On macOS/Linux
source venv/bin/activate
```3. Install dependencies:
```bash
pip install -r requirements.txt
```## Usage
Run the demonstration:
```bash
python app.py
```## Project Structure
```
.
├── 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
```## Contributing
Contributions are welcome! Feel free to:
- Add more language support
- Improve translation structures
- Add more complex pluralization rules
- Enhance documentation## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.**Author:** [ysskrishna](https://github.com/ysskrishna)