1. Stefan Zierold
  2. PowerBuilder
  3. Thursday, 11 August 2022 08:25 AM UTC

Hi,

we have to implement a third party webpage inside our powerbuilder application and we're using the webbrowser control for it. 

When opening the page with an external browser the webpage is in german language. If we open the same url inside the pb app, the webpage is in english language.

i looked into it and tried something in javascript

navigator.language in external browser is 'de-DE' and when using the webbrowser control it is 'en-US'.

Is there a way to change it to 'de-DE' ?

Regards 

Stefan.

René Ullrich Accepted Answer Pending Moderation
  1. Thursday, 11 August 2022 13:34 PM UTC
  2. PowerBuilder
  3. # 1
Comment
There are no comments made yet.
John Fauss Accepted Answer Pending Moderation
  1. Thursday, 11 August 2022 15:13 PM UTC
  2. PowerBuilder
  3. # 2

Hi, Stefan -

What version/release/build of PB are you using?

Using PB 2019 R3 Build 2703, I created a test window that contains a web browser control and a default URL to a German-language web page I found:

   https://developer.mozilla.org/de/docs/Web/HTML/Global_attributes/lang

and it displays the same in the web browser control as it does in the Chrome browser.

Does the web page you are needing to display specify the language in the <html> tag, as the above web page does?

Best regards, John

Comment
There are no comments made yet.
Stefan Zierold Accepted Answer Pending Moderation
  1. Friday, 12 August 2022 06:14 AM UTC
  2. PowerBuilder
  3. # 3

Hi,

i tried it with the following page :

https://manytools.org/http-html-text/browser-language/

 

With Chrome (104.0.5112.81) i get the following:

Your browser's Accept-Language header:
de-DE,de;q=0.9,en-DE;q=0.8,en;q=0.7,en-US;q=0.6

Same Page with the webbrowser control of Powerbuilder 2021 (Build 1509) i get :

Your browser's Accept-Language header:
en-US,en;q=0.9

Regards

Stefan

Comment
There are no comments made yet.
Stefan Zierold Accepted Answer Pending Moderation
  1. Friday, 12 August 2022 06:18 AM UTC
  2. PowerBuilder
  3. # 4

I also tried to call "about:config" 

Is there a way to change the "--lang" paramater in the commandline? 

CEF 3.3626.1894.g90eb8cc
Chromium 72.0.3626.96
OS Windows
WebKit 537.36 (@84098ee7ef8622a9defc2ef043cd8930b617b10e)
JavaScript 7.2.502.25
Flash  
User Agent Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.96 Safari/537.36
Command Line "C:\Program Files (x86)\Appeon\PowerBuilder 21.0\PB210.exe" --browser-subprocess-path="C:\Program Files (x86)\Appeon\Common\PowerBuilder\Runtime 21.0.0.1509\pbcef\pbcefclient.exe" --no-sandbox --lang=en-US --log-file="C:\Users\SEF7B~1.ZIE\AppData\Local\Temp\pbcefcache\pbwebbrowser.log" --log-severity=disable --resources-dir-path="C:\Program Files (x86)\Appeon\Common\PowerBuilder\Runtime 21.0.0.1509\pbcef" --locales-dir-path="C:\Program Files (x86)\Appeon\Common\PowerBuilder\Runtime 21.0.0.1509\pbcef\locales" --uncaught-exception-stack-size=4096 --enable-system-flash --enable-media-stream --disable-gpu --no-sandbox
Module Path C:\Program Files (x86)\Appeon\Common\PowerBuilder\Runtime 21.0.0.1509\pbcef\libcef.dll
Cache Path C:\Users\SEF7B~1.ZIE\AppData\Local\Temp\pbcefcache
Comment
  1. John Fauss
  2. Friday, 12 August 2022 13:41 PM UTC
That's a very good question, one that I cannot answer. I suggest you open a bug ticket that describes your problem issue. In the ticket description, you might ask this particular question. Please let us know what you find out.
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.