seleniumhq-community / docker-seleniarm

Multi-Arch (arm64/armhf/amd64) Docker images for the Selenium Grid Server
https://hub.docker.com/u/seleniarm
Other
249 stars 26 forks source link

[🐛 Bug]: Chromium language argument --lang will be ignored #39

Open mediaessenz opened 1 year ago

mediaessenz commented 1 year ago

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

ddev exec vendor/bin/codecept run tests/Acceptance --steps --html

Relevant log output

Not available

Operating System

macOS Ventura 13.1

Docker Selenium version (tag)

113.0

diemol commented 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?

mediaessenz commented 1 year ago

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

diemol commented 1 year ago

You can set the browser language in any operating system. I just wonder if Chromium does that too.

Jakeler commented 8 months ago

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.