question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Question] How to change the browser language?

See original GitHub issue

Hi all,

I have created a brand new project via the vs code extension. When I start example.spec.ts, keep the browser open and check the browser language, I get the following results: chromium: browser language german firefox/webkit: browser language english

My system language is german.

Changing locale: in the config file does not affect the results.

Is it possible to change the browser language? If yes, how?

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
GunjanShethcommented, Sep 14, 2022

it seems you are using JavaScript which i am not much familiar with, but i once tried the locale on python using the following.

with sync_playwright() as playwright:
    browser = playwright.chromium.launch(headless=False, channel='msedge')
    context = browser.new_context(locale="de-DE")
    page = context.new_page()
    page.goto("https://www.google.com")
    time.sleep(10)

I checked launching Google home page, it does open in German Language. I’m sure you would find relevant code in node.js

image

0reactions
ghostcommented, Sep 15, 2022

This is not how the web works, your date control has to use some web apis, some Javascript apis etc. Unless we know which ones, we can’t act on it. Changing the browser language is the wrong approach there.

I recommend contacting a dev on your side to debug that further.

Ok, thanks again for your time and help. I will close this issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Change your language on the web - Computer - Google Support
Sign in to your Google Account. On the left, click Personal info. Under "General preferences for the web," click Language and then Edit...
Read more >
4 Ways to Change Your Browser's Language - wikiHow
1. Open {"smallUrl":"https:\/\/www.wikihow.com\/images\/c\/cd\/Android7chrome.png","bigUrl":"\/images\/thumb\/c\/cd\/Android7chrome.png\/30px-Android7chrome ... 2. Click ⋮. It's in the top-right corner of the Chrome window. Clicking it prompts a drop-down menu to...
Read more >
Setting language preferences in a browser - W3C
To change those preferences go to System Preferences > Language & Region > Preferred Language , but be aware that it will change...
Read more >
How to Change the Default Language of an Internet Browser.
In the upper-left corner of the screen, click the Apple icon to open the Apple menu and select System Preferences.
Read more >
How to Change Language in Google Chrome [2022] - YouTube
How to Change Language in Google Chrome to English or Any Other LanguageAdjusting your language settings is an easy way to customize Google ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found