How to change the language of a website in Ajax TruClient?

  • KM01262949
  • 20-Nov-2014
  • 20-Nov-2014

Summary

There is a way to manually change the language in which the website pages are displayed in Ajax TruClient

Question

Most applications/servers will render a website in a language according to the HTTP Accept-Language header sent by the user's browser.
The header value specifies the user language i.e. using a header "Accept-Language: de-DE" will render the website pages in German.

Normally TruClient will send "Accept-Language: en-US" header, which will render the pages in English.

Answer

To change the default Accept-Language value for TruClient IE 12.0x:

  1. Open Windows registry editor (regedit.exe)
  2. Navigate to the HKEY_CURRENT_USER\Software\Hewlett-Packard\TruClient\TruCLientIE\TCIE key
  3. Check if the "AcceptLanguage" value exists
     a) If it does modify it's data to 'de-DE' (or any other valid language string).
     b) If it doesn't, create a new string value (of type REG_SZ) with a name "AcceptLanguage" and data 'de-DE' (or any other valid language string).
  4. Create a new TruClient IE script. Web pages should now be displayed according to the language string used.

To change the default Accept-Language value for TruClient Firefox 12.0x

  1. Open Windows Explorer and navigate to %APPDATA% folder, then \Hewlett-Packard\LoadRunner\Web2\LrWeb2MasterProfile
  2. Open user.js with Notepad
  3. Add the following line at the bottom:

    user_pref("intl.accept_languages", "de-DE");

    Any other valid language string could be used instead of 'de-DE'.
  4. Save the file.
  5. Create a new TruClient Firefox script. Web pages should now be displayed according to the language string used.