A lightweight offline translator with English → Persian support.
Works completely offline, no additional models or internet required.
Supports both CLI and GUI modes with CustomTkinter.
- 📝 Translate text offline (English → Persian)
- 💾 Save translation history in SQLite
- 🖥️ GUI with CustomTkinter
- 💻 CLI support for quick translations
- ⚡ Fast, lightweight, and portable
OfflineTranslator/
├── dist/ # فایل EXE نهایی
│ └── translator.exe
├── history.db # دیتابیس SQLite
├── assets/ # تصاویر یا فایلهای اضافی
│ └── preview.png
├── LICENSE # لایسنس MIT
├── README.md # توضیحات پروژه
├── requirements.txt # پکیجهای مورد نیاز (برای توسعه)
├── translator.py # کد اصلی (برای توسعه و بازسازی EXE)
└── OfflineTranslator_v1.0.zip # ZIP آماده ریلیز (فقط شامل EXE)
GUI example: type English text → click Translate → get Persian output
1️⃣ Clone the repo:
git clone https://github.com/YourUsername/OfflineTranslator.git
cd OfflineTranslator2️⃣ Install dependencies:
Copy code
pip install -r requirements.txtOnly CustomTkinter is required since translation uses a built-in dictionary.
💻 Usage CLI Mode
Copy code
python translator.py
Select 1 for CLI modeType English text and get Persian translations instantly
GUI Mode
Copy code
python translator.py
Select 2 for GUI modeType your English text in the box
Click Translate → get Persian output
-
Translations are stored in history.db
-
Automatically created on first run
-
Browse past translations anytime
-
Download the EXE ZIP from Releases
-
Extract and run translator.exe
-
Works without Python or any installation
-
Recommended: run EXE in a folder where it can create history.db (e.g., Desktop or Documents)
-
Translation uses a built-in dictionary, so not all phrases may be supported
-
Expandable by editing the simple_dict in translator.py
-
Fully offline, lightweight, and easy to distribute
MIT License © 2025 danialsource
