Open mediaessenz opened 1 year ago
This is something added in the Chrome container https://github.com/SeleniumHQ/docker-selenium/blob/trunk/NodeChrome/wrap_chrome_binary.
Does the language setting also work for Chromium? Have you tested it locally?
Since I work under macOS, I can't test it locally, since chrome and chromium using the language of the system here.
The only thing I know is, that it is working with selenium on my intel machine (Core i9), but not on my arm machine (M1).
You can set the browser language in any operating system. I just wonder if Chromium does that too.
So I spent a while figuring this out as well. Tried building a image FROM seleniarm/node-chromium:117.0
with
ENV LC_ALL de_DE.UTF-8
ENV LANG de_DE.UTF-8
ENV LANGUAGE de_DE.UTF-8
RUN sudo bash -c "echo 'de_DE.UTF-8 UTF-8' >> /etc/locale.gen"
RUN sudo locale-gen
This sets the locale on the debian system correctly, but surprisingly chromium did not care.
Reason is that debian builds chromium only with en language support per default. They ship other languages in this package: https://packages.debian.org/bullseye/chromium-l10n
RUN sudo apt update
RUN sudo apt install -y chromium-l10n
Would be good to add it here/upstream, because if installed later apt also updates chromium, overwrites the wrapper script etc... On the official selenium image it works out of the box, since they use google chrome, which includes everything in a single package.
What happened?
I try to change the language of chromium to german, which is currently not working in this arm version (seleniarm/standalone-chromium:113.0).
With the official version (selenium/standalone-chrome:113.0) on a intel machine it works as expected.
The argument I used to change the language is
--lang=de
.I also tried to change the language by setting these environment variables:
The selenium container is managed by ddev, a php development environment: https://ddev.readthedocs.io/en/stable/#system-requirements
It is finaly controlled by codeceptions Webdriver: https://codeception.com/docs/modules/WebDriver
Command used to start Selenium Grid with Docker
Relevant log output
Operating System
macOS Ventura 13.1
Docker Selenium version (tag)
113.0