Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chrome.switches="--lang=en-us" is not updating my webpage language #2098

Closed
gopal3008 opened this issue May 20, 2020 · 10 comments
Closed

chrome.switches="--lang=en-us" is not updating my webpage language #2098

gopal3008 opened this issue May 20, 2020 · 10 comments

Comments

@gopal3008
Copy link

I am working on a retail website and the native language is some European country . I want to change it to English. I am using chrome.switches like below

but nothing happens.

chrome.switches="--lang=en-us;--incognito;--start-maximized"
Even though browser opens in incognito mode but the language is not getting changed

@gopal3008
Copy link
Author

Is it enough to just mention below changes in serenity.conf or do we have to tell my script specifically to change the language. If yes then how can we do that.
chrome.switches="--lang=en-us;--incognito;--start-maximized"

@wakaleo
Copy link
Member

wakaleo commented May 20, 2020

The chrome.switches options should be sufficient.

@gopal3008
Copy link
Author

I have done the same in my serenity.conf file
chrome.switches="--lang=en-us"
Its not working page is still opening in native language.

@globalworming
Copy link
Collaborator

check https://browserspy.dk/language.php with different languages and ensure it changes something

@gopal3008
Copy link
Author

tried to do but sadly it didn't work. Any other suggestion.

@wakaleo
Copy link
Member

wakaleo commented May 24, 2020

Could be a driver issue. Does it work in plain selenium?

@globalworming
Copy link
Collaborator

the --lang option did nothing for me.. setting intl.accept_languages did though
https://stackoverflow.com/a/50602007/1359903

@globalworming
Copy link
Collaborator

setting chrome_preferences.intl.accept_languages=ja-jp in the serenity.properties did work

@gopal3008
Copy link
Author

I will try this.

@globalworming
Copy link
Collaborator

any luck @gopal3008 ?

@wakaleo wakaleo closed this as completed Feb 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants