XLanguage is a sophisticated multilingual chat interface that leverages the power of X.AI to provide seamless communication across multiple languages. With support for various languages across European, Asian, Middle Eastern, African, and other regions, XLanguage breaks down language barriers in real-time conversation.
-
🌐 Multilingual Support
- European Languages (English, Spanish, French, German, etc.)
- Asian Languages (Chinese, Japanese, Korean, Hindi, etc.)
- Middle Eastern Languages (Arabic, Hebrew, Persian, Turkish)
- African Languages (Swahili, Amharic, Zulu)
- Other Regional Variants
-
🎯 Key Capabilities
- Real-time language switching
- Intuitive user interface
- Responsive design
- Typing indicators
- Message history
- Error handling
- Copy message functionality with formatting preservation
- Secure API key management
- Python 3.7 or higher
- pip requirement.txt
- X.AI API key
- Clone the repository
git clone https://github.com/deepak-lenka/XLanguage.git
cd XLanguage
- Install dependencies
pip install -r requirements.txt
- Set up environment variables
- Copy
.env.example
to.env
:
cp .env.example .env
- Edit
.env
and add your X.AI API key:
XAI_API_KEY=your_api_key_here
- Run the application
flask run
The application will be available at http://127.0.0.1:5000
- Backend: Flask (Python web framework)
- API Integration: X.AI API for language processing
- Error Handling: Comprehensive logging and error management
- Configuration: Environment-based configuration
- Session Management: Conversation state management
XLanguage/
├── app.py # Main Flask application
├── config/ # Configuration files
├── services/ # Core services (XAI, Conversation)
├── static/ # Static assets
├── templates/ # HTML templates
└── requirements.txt # Project dependencies
-
Environment Variables Create a
.env
file with the following variables:XAI_API_KEY=your_api_key_here FLASK_DEBUG=False # Set to True for development
-
API Configuration
- Configure X.AI API settings in
config/config.py
- Adjust conversation settings in
services/conversation_manager.py
- Configure X.AI API settings in
- Create a virtual environment (recommended)
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
- API keys are stored securely in
.env
file .env
is excluded from git repository- Environment-specific configurations are supported
- Proper error handling for missing API keys
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.