This tool is used to translate your already exiting data in your database when you want to use spatie/laravel-translatable package. One of the pain points of using this package is that you have to translate your exiting data manually which is a tedious task.
With this tool you can export your data to a CSV file, translate it using this tool and import it back to your database.
Currently, this tool uses OpenAI API to translate your data.
- Clone the repository
- Create virtual environment (Recommended, Optional)
python -m venv venv
-
Activate virtual environment (Optional)
On Windows:
venv\Scripts\activate.bat
On MacOS/Linux:
source venv/bin/activate
-
Install dependencies
pip install -r requirements.txt
- Run the application
python main.py
- Enter you OpenAi API key. You can get it from here
- Select your model.
- Choose your csv file.
- Choose the column that you want to translate.
- Choose the source language.
- Choose the target languages.
- Click on translate button.
- Add Google Translate
- User can choose whether ID column should be in output file
- Main thread issue, use multithreading to prevent screen freeze during translation and show loader or progress bar
- Input validation
- Create Executables
- Create samples
- Marian Machine Translation
If you faced the below error
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found. This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Available platform plugins are: linuxfb, vnc, wayland, xcb, minimalegl, offscreen, vkkhrdisplay, eglfs, wayland-egl, minimal.
[1] 260179 IOT instruction (core dumped) python main.py
Try to run the application after running the following command
sudo apt-get install libxcb-cursor0