Skip to content

ysskrishna/python-i18n-showcase

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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:
git clone https://github.com/ysskrishna/python-i18n-showcase.git
cd python-i18n-showcase
  1. Create and activate a virtual environment (recommended):
python -m venv venv
# On Windows
venv\Scripts\activate
# On macOS/Linux
source venv/bin/activate
  1. Install dependencies:
pip install -r requirements.txt

Usage

Run the demonstration:

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 file for details.

Author: ysskrishna

About

A demonstration of internationalization (i18n) features in Python, showcasing multiple language support, pluralization rules, and string interpolation.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages