Features | Technologies and tools | Getting started | Screenshots | Example translations
Translate text from picture. Save translation and share it with others. Powered by Google Tesseract and LibreTranslate.
- translate text from picture using OCR technique
- save translation
- edit recognised and translated text
- share translation with other users
- supports 43 languages: English, Polish, German, Chinese, Russian, more languages
- Python 3.11
- PHP 8.2
- TypeScript 5.4.5
- Tesseract and py-tesseract
- LibreTranslate 1.6.1
- Backend: Laravel framework 11.7.0
- Frontend: Vue 3 with packages
- tanstack-query (react-query)
- vuetify
- yup and vee-validate
- axios
- eslint and prettier
- vite
- Clone this repo
git clone https://github.com/krzysztofhewelt/image-translator.git
- Install Tesseract: https://tesseract-ocr.github.io/tessdoc/Downloads.html
- Install all packages (Python)
pip install -r tesseract/requirements.txt
- Copy
.env.example
to.env
inweb
directory. Set database credentials in that fileDB_CONNECTION=mysql DB_HOST=localhost DB_PORT=3306 DB_DATABASE=image_translator DB_USERNAME=root DB_PASSWORD=superpassword DB_COLLATION=utf8mb4_unicode_ci
- If required, change LibreTranslate API, Tesseract path and Backend API endpoint
Also change Tesseract path in
APP_URL=http://localhost BASE_API_URL=http://127.0.0.1:8000/api TRANSLATE_API=http://127.0.0.1:5000 PYTHON_INTERPRETER=C:\Users\Krzysiu\anaconda3\python.exe
tesseract/main.py
# Config pytesseract.pytesseract.tesseract_cmd = r'C:\\Program Files\\Tesseract-OCR\\tesseract.exe'
- Run needed dependencies (Backend and frontend) and init backend
composer install npm install php artisan key:generate php artisan jwt:secret php artisan migrate
- Run LibreTranslate API (run command)
libretranslate
- Run backend and frontend server (development mode)
php artisan serve npm run dev
- App is running at
http://localhost:8000/
. - In production mode copy all files to your HTTP server. Then compile frontend files using command
npm run build
.