How to open a firefox browser in a different language?

Hi, I am new with the Browser library.
My robot opens Chromium browser in french but not the firefox.
I had downloaded my firefox in english at first so I reinstalled it in french but my robot still opens the firefox browser in english.

I tried the following :

New Browser browser=firefox headless=${HEADLESS_MODE} args=[“- -lang=fr-FR”]

but it does not work.

How can I force it to open the firefox browser in french please ?

Hello!
This is not as much of a robot framework/browser issue but more how command line arguments work for each of the browsers.

The command line argument that you are using - -lang=fr-FR seems to be specific to chromium based browsers. (see here List of Chromium Command Line Switches « Peter Beverloo).

That just means that the argument will not be recognized as an argument when running firefox. You can find the firefox specific arguments here: Firefox/CommandLineOptions - MozillaWiki

What i understood firefox does not have an argument that has a similar function as --lang. Though my guess is that you can achieve the same thing through firefox profiles. Give that a try!

1 Like