
how to run firefox with default language(en-gb) from command line
I need to run selenium bat file which opens Mozilla firefox (which is in windows server) with default language(en-gb) from Linux server via ssh ,
Chosen solution
cor-el said
Support for the command line switch to start Firefox with a specific locale has been removed. You can only use a pref (intl.locale.requested) to select the locale. You can possibly use/copy a user.js file to the profile folder or set up Selenium to initialize this pref.Read this answer in context 👍 0
All Replies (8)
Hi
I will admit that I have never tried to do what you are attempting (and welcome comments and assistance from fellow contributors), but have you got the en-GB version of Firefox installed?
You can download a copy from here.
Support for the command line switch to start Firefox with a specific locale has been removed.
You can only use a pref (intl.locale.requested) to select the locale. You can possibly use/copy a user.js file to the profile folder or set up Selenium to initialize this pref.
Thank you for you inputs. Can I get old versions of firefox in specific language.
Chosen Solution
cor-el said
Support for the command line switch to start Firefox with a specific locale has been removed. You can only use a pref (intl.locale.requested) to select the locale. You can possibly use/copy a user.js file to the profile folder or set up Selenium to initialize this pref.
When I added preference in selenium setup like below, still I am unable to launch firefox with en-gb
FirefoxProfile ffprofile = profile.getProfile("default"); ffprofile.setPreference("intl.accept_languages","en-gb"); driver = new FirefoxDriver(ffprofile);
my problem resolved
You need to set intl.locale.requested for the user interface language like I wrote above.
- ffprofile.setPreference("intl.locale.requested","en-GB");