Skip to content
This repository has been archived by the owner on Jun 22, 2024. It is now read-only.

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

Open
mediaessenz opened this issue May 13, 2023 · 4 comments
Open

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

mediaessenz opened this issue May 13, 2023 · 4 comments
Labels
bug Something isn't working R-awaiting-answer

Comments

@mediaessenz
Copy link

mediaessenz commented May 13, 2023

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:

  • LANG=de_DE
  • LANGUAGE=de_DE

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

@mediaessenz mediaessenz added the bug Something isn't working label May 13, 2023
@diemol
Copy link
Member

diemol commented May 15, 2023

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
Copy link
Author

mediaessenz commented May 15, 2023

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
Copy link
Member

diemol commented May 15, 2023

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

@Jakeler
Copy link

Jakeler commented Dec 22, 2023

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working R-awaiting-answer
Projects
None yet
Development

No branches or pull requests

3 participants