Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Translate from English #12

Open
aybed opened this issue May 10, 2023 · 4 comments
Open

Translate from English #12

aybed opened this issue May 10, 2023 · 4 comments

Comments

@aybed
Copy link

aybed commented May 10, 2023

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.

@gokberkgunes
Copy link

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')

@aybed
Copy link
Author

aybed commented May 10, 2023

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

@gokberkgunes
Copy link

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.

  1. Clone the repository
git clone https://github.com/ahrm/sioyek-python-extensions.git
  1. Edit translate.py file.
cd sioyek-python-extensions
vim src/sioyek/translate.py
  1. Install the package
doas python -m pip install . || sudo python -m pip install .

@aybed
Copy link
Author

aybed commented May 10, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants