LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-20-2022, 04:30 AM   #1
Camello
Member
 
Registered: Apr 2021
Location: USA
Distribution: MX-LINUX
Posts: 218

Rep: Reputation: Disabled
Problems to configurate Chromium to translate websites.


Hello,

I install chromium* but I can't find how to configure it to always translate from any language to Spanish the websites I visit in a permanent way/stable.

Right-clicking on the page in question opens in the URL the application for the language translations, but I can't find an option to make this permanent -- so every time I switch to another page, or even on the same page when I go to another link, it comes back into English.

An option to translate in 'languages' is frozen:

https://www.linuxquestions.org/quest...1&d=1658309044



What am I missing?. What else do I need to do?



*sudo apt install chromium -y

sudo apt install chromium-l10n chromium-shell
chromium-driver

*Version 103.0.5060.114 (Official Build) built on Debian 11.3, running on Debian 11.4 (64-bit)

*Debian 11 Bullseye.



Thanks for any suggestions, comments.
Attached Thumbnails
Click image for larger version

Name:	Captura de pantalla_2022-07-20_05-17-03.png
Views:	12
Size:	85.6 KB
ID:	39292  

Last edited by Camello; 07-20-2022 at 04:43 AM.
 
Old 07-20-2022, 11:49 AM   #2
teckk
LQ Guru
 
Registered: Oct 2004
Distribution: Arch
Posts: 5,137
Blog Entries: 6

Rep: Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826
What language and other headers is your web browser reporting to websites?

In a terminal run:
Code:
ncat -klp 8100 -v
Then navigate to http://127.0.0.1:8100 in your web browser. Look at the terminal.

Or got to one of those web sites that tells you.
https://www.whatismybrowser.com/dete...rowser-sending

You can then go to chromium's config and set the default language for page requests. Look at it again and see what header it is sending.

Another help for that would be, open netcat in a terminal again and:
Code:
#!/usr/bin/python

from urllib import request

agent = ('Mozilla/5.0 (Windows NT 10.0; Win64 x64; rv:102.0) '
            'Gecko/20100101 Firefox/102.0')

user_agent = {'User-Agent': agent,
            'Accept': 'text/html,application/xhtml+xml,'
            'application/xml;q=0.9,*/*;q=0.8',
            'Accept-Charset': 'ISO-8859-1,utf-8;q=0.7,*;q=0.3',
            'Accept-Encoding': 'none',
            'Accept-Language': 'en-US,en;q=0.8',
            'Connection': 'keep-alive'}
            
url = 'http://127.0.0.1:8100'

req = request.Request(url, data=None, headers=user_agent)

request.urlopen(req).read()
Look and see what is reported in the terminal

You can change the language in that header, look and see what it reports. That will give you a better understanding of what is being sent.
 
Old 07-20-2022, 11:55 AM   #3
teckk
LQ Guru
 
Registered: Oct 2004
Distribution: Arch
Posts: 5,137
Blog Entries: 6

Rep: Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826
You could also of course change that to:
Code:
url = 'https://www.whatismybrowser.com/detect/what-http-headers-is-my-browser-sending'

req = request.Request(url, data=None, headers=user_agent)
with open('test.html', 'wb') as f:
    f.write(request.urlopen(req).read())
And get a real world interaction with a web page to see what headers your browser is reporting. And a hard copy 'test.html', to look at.
 
Old 07-20-2022, 12:36 PM   #4
Camello
Member
 
Registered: Apr 2021
Location: USA
Distribution: MX-LINUX
Posts: 218

Original Poster
Rep: Reputation: Disabled
It's too late, I uninstalled it, it was too complicated for me because I also installed google-chrome (it doesn't have that problem with the translator) but it had others in the configuration, it didn't let me open the email, both made me lose a lot of time ...

I went other ways.

I am only commenting this so as not to leave your replies unanswered.

Anyway thank you very much for everything.
 
Old 07-20-2022, 01:11 PM   #5
teckk
LQ Guru
 
Registered: Oct 2004
Distribution: Arch
Posts: 5,137
Blog Entries: 6

Rep: Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826
Welcome.

Thought that I had this in my bookmarks somewhere.
https://www.fincher.org/Utilities/Co...uageList.shtml
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Youtube's continuous error using Chromiun Browser Michael Piziak Linux - Newbie 5 07-23-2020 01:52 PM
LXer: Crow Translate: Desktop / CLI Text Translation App Using Google Translate, Yandex Translate and Bing Translator LXer Syndicated Linux News 0 05-11-2019 05:13 AM
Chromiun bookmark bar always on when in incognito mode denydias Slackware 6 10-28-2015 01:59 PM
BASH/No X: Using google translate to convert TXT files (translate) frenchn00b Programming 10 09-13-2009 10:55 PM
to translate or not to translate HTML rblampain General 2 07-05-2007 09:04 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:31 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration