Setting Firefox language

Skip to first unread message

Carsten Fuchs

Jan 22, 2023, 10:55:57 PMJan 22
Dear group,

we're using Firefox with Selenium on the following system:
Ubuntu 22.04 LTS, Firefox 109.0, geckodriver 0.32.0, Selenium 4.7.2, Python 3.10

The problem is that Firefox uses the English language and locale, but we need it to use German.

This is the code used for initialization:

options = webdriver.firefox.options.Options()
service = webdriver.firefox.service.Service(log_path=".geckodriver.log")

options.set_preference('intl.accept_languages', 'de-DE')
options.set_preference('intl.locale.requested', 'de-DE')

cls.browser = webdriver.Firefox(options=options, service=service)

Unfortunately, setting the preferences as shown above doesn't have any effect: The browser language and locale stay in English. For example, the text at the about:support page is in English, but we would prefer to see the German translation.

Can you please advise what can we do?

Best regards,
Reply all
Reply to author
0 new messages