Translate from English
Regarding translate extension, is it possible to translate selected text from English to any other language by using DeepL or google translate in the next coming versions? Meanwhile, this is definitely the best pdf reader for reading academic papers.
As an example, you can modify the python script called translate.py as shown below to to translate to French.
translation = translator.translate(text, dest='fr')
Thank you for quick reply. Could you please tell me possible locations of this file? I mean I just installed extensions by "python -m pip install sioyek'' then edited prefs_user.config file according to extension. Thanks
Thank you for quick reply. Could you please tell me possible locations of this file? I mean I just installed extensions by "python -m pip install sioyek'' then edited prefs_user.config file according to extension. Thanks
The file is located under src/sioyek/ directory.
You may follow below approach in order to install the extensions. I am assuming you're on some sort of UNIX-like system, e.g. Linux.
- Clone the repository
git clone https://github.com/ahrm/sioyek-python-extensions.git
- Edit
translate.pyfile.
cd sioyek-python-extensions
vim src/sioyek/translate.py
- Install the package
doas python -m pip install . || sudo python -m pip install .
Thank you very much. I managed to edit python file. For windows users, the related python files for extensions are stored on Lib folder under python installation directory.