How to set browser language for chrome for localization testing


This post is regarding how to set browser language for localization testing from command prompt, the localization test is major part of testing activities, but set browser language  and again reset it sometimes  become very complex task for test team.

This blog teach you how to open chrome browser instance with desired language without impacting main browser language or default browser language. Default chrome browser language would remain same, only browser instance will open with desired language.

In manual tests you can change browser language and after reset as well but through automation it is tough task to change and reset browser language.

If you have developed automation suite and same suite want to execute on different language this post help you to achieve the handle localization part.

How to change chrome browser language without access settings are explained below with examples
  1.  Copy the chrome browser location from file system or explorer, in my case it is (C:\Program Files (x86)\Google\Chrome\Application\chrome.exe)
  2. Open command prompt with administrator
  3. Type on Command prompt CD\ to get back from current directory
  4. Paste browser path on command prompt
  5. Add one space and type C:\Program Files (x86)\Google\Chrome\Application\chrome.exe --lang=language abbreviation
  6. Press enter that you will redirected to browser instance with given language abbreviation.



In above example command prompt will open chrome browser instance with German language. You can change language abbreviation to open instance in changed language.

For example if you want to open browser instance with French language you can follow below example


In above example browser instance will open with French language and that can be check by clicking on customize and control google chrome option at top right side. For example please check in below.




In Automation suite you can create multiple batch file for each browser language and invoke that batch file to launch browser with specified language. Below are steps to create batch file for open browser instance in specific language.
  1. Create batch file create batch file with extension (.bat)
  2. Set browser directory path and click enter
  3. In new line add code Chrome.exe –lang=DE “your application url”

In above example not need to reset browser language, also you can  parameterize browser path, application url and language abbreviation.

Also you can watch below video for more details...





If you have any query regarding localization please comment below, please like and subscribe blog for more tricks in automation. happy learning

Comments

  1. nice article :) good going all best for future articles :)

    ReplyDelete
  2. I have read all the comments and suggestions posted by the visitors for this article are very fine,We will wait for your next article so only.Thanks! Chinese translation

    ReplyDelete
  3. Positive site, where did u come up with the information on this posting? I'm pleased I discovered it though, ill be checking back soon to find out what additional posts you include. Feedback Analytics

    ReplyDelete
  4. I have read all the comments and suggestions posted by the visitors for this article are very fine,We will wait for your next article so only.Thanks!
    how changes are handled

    ReplyDelete

Post a Comment

Popular posts from this blog

Excel Operation in VBScript

Usage of File system object (FSO) in Vbscript. QTP / UFT