Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>[NEW ANSWER]</p> <p>Ok I assume you do something like this in the applet</p> <pre><code>URL url = new URL("http://www.whateverwebservice.com/passmealongthedata"); URLConnection urlconn = url.openConnection(); </code></pre> <p>Then just set the <code>Accept-Language</code> header before you do the real request</p> <pre><code>//Assuming you know the language parameter you want to pass along you urlconnection.setRequestProperty("Accept-Language", "en-GB"); //or "en-GB,en;q=0.7" or similar .... continue with your program flow .... </code></pre> <p>If the language parameter should depend on the one set in the browser, it would make sense to use your .Net approach. When the user requests the page with the applet on construction on the page insert the below described additional <code>&lt;parameter&gt;</code> tag. And modify the applet to send that value along. Hope I'm clear on this.</p> <hr> <p>[REMOVED]</p> <hr> <p>[OLD ANSWER]</p> <p>Assuming you really want to determine the browser version on the client side in an applet:</p> <p>That isn't directly possible from java AFAIK as the applet shouldn't have to care in which browser it is running. But you could</p> <ul> <li>with javascript first determine the browser version</li> <li>with javascirpt then dynamically writing the applet tag</li> <li>and passing the browser version in to the applet via a tag</li> </ul> <p>Check <a href="http://www.cafeaulait.org/course/week5/16.html" rel="noreferrer">Passing Parameters to Applets</a> for a sample on how to do this.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload