-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Language and locale not set to system default #2087
Comments
@carstenfuchs I assume the same is the case when you start Firefox manually? In such a case it would be an issue with the Firefox snap package but not geckodriver, and a bug should be filed similar to all the other ones that are listed as dependency for https://bugzilla.mozilla.org/show_bug.cgi?id=1665641. Please let me know. Thanks! |
Hello @whimboo , |
Ok, so the geckodriver that you are using here is the snap-packaged one as well, right? |
Yes. After my upgrade to Ubuntu 22.04 LTS I removed the geckodriver that I used until then, so that the snap-packaged is the only one left on my system:
|
Would you mind doing me a favor and test a non-snap packaged geckodriver and Firefox? I only want to be sure that this combination still works. Thanks! |
This works:
|
Ok, so it's indeed snap related. Could you also please check how it works when you use the non-snap packaged geckodriver but the Firefox binary from the Snap package? Note that you would have to pass the I'm asking because I would like to know where exactly the language information is lost. Thanks! |
@carstenfuchs sorry for the long delay in my response. But I somehow missed your reply. Ok, so this all is related to the snap packages for Firefox and geckodriver then. What's interesting is that it also happens when both binaries run from within the same snap, because that's how they are packaged. Could you please check by running both geckodriver and Firefox from snap if the preferences that you set for localization are set when querying for those in |
Hi. I have met the same problem recently. Have you solved this? |
I have the same issue. Firefox still in english. Scenario to reproduce available in SeleniumHQ/docker-selenium#2361 . |
Hi @whimboo, options = webdriver.firefox.options.Options()
service = webdriver.firefox.service.Service(log_path="geckodriver.log")
options.set_preference('intl.accept_languages', 'vi-VN')
options.set_preference('intl.locale.requested', 'vi-VN')
browser = webdriver.Firefox(options=options, service=service)
webdriver.Firefox.install_addon(browser, "/my/local/path/to/vi.xpi")
browser.get("about:support")
sleep(10)
browser.quit()
So, my question is, how to configure all addons under |
System
Testcase
Trace-level log
Please see attachment: geckodriver.log
Description
I recently upgraded from Ubuntu 20.04 LTS to Ubuntu 22.04 LTS, where Firefox is installed as a
snap
package. My system language and locale is german, and under Ubuntu 20.04 LTS, the above script had the "about:support" page displayed in german language. This used to work without the two linesoptions.set_preference(…)
.Now with Ubuntu 22.04 LTS, the "about:support" page is always in english.
I tried adding the
options.set_preference(…)
lines, but they make no difference.What is the proper way please to set the language and locale so that "about:support" and similar pages are displayed in the system default language?
The text was updated successfully, but these errors were encountered: