A bunch of webpages exist, like Wikipedia, which have a language annotation in the URL (e.g. the German Wikipedia side is `de.wikipedia.org`). Hence, connecting to Wikipedia in multiple languages is trivial, one only need to change "de" by "en" for example. This leads to my problem. What to do if an homepage offers multiple languages, but doesn't have a language annotation in their URL?

When I connect with Java to the following homepage (<http://www.hermes.admin.ch/>), it is always presented in English. I found out, that English is the default language. However, they offer to change the language by clicking on the language type at the top right side. From the source code, the following code fragment shows the active language:

```
<!-- German -->
<li>
<script type="text/javascript" src="/javax.faces.resource/jsf.js.xhtml?ln=javax.faces"></script>
<a id="lang-select-form_de" href="#" onclick="mojarra.jsfcljs(document.getElementById('lang-select-form'),{'lang-select-form_de':'lang-select-form_de'},'');return false" class="inactive">Deutsch</a>
</li>

<!-- French -->
<li><a id="lang-select-form_fr" href="#" onclick="mojarra.jsfcljs(document.getElementById('lang-select-form'),{'lang-select-form_fr':'lang-select-form_fr'},'');return false" class="inactive">Français</a>
</li>

<!-- Italian -->
<li><a id="lang-select-form_it" href="#" onclick="mojarra.jsfcljs(document.getElementById('lang-select-form'),{'lang-select-form_it':'lang-select-form_it'},'');return false" class="inactive">Italiano</a>
</li>

<!-- English -->
<li class="last"><a id="lang-select-form_en" href="#" onclick="mojarra.jsfcljs(document.getElementById('lang-select-form'),{'lang-select-form_en':'lang-select-form_en'},'');return false" class="active">English</a>
</li>

```

Hence finding out, which of the languages is active, is easy. Nevertheless, I don't find out, how I can tell the side using Java to set the active language to German without clicking on their link at the top right side.

My Java connection:

```
String url = "http://www.hermes.admin.ch/onlinepublikation/index.xhtml";    
URL myURL = new URL(url);
CookieHandler.setDefault(new CookieManager(null, CookiePolicy.ACCEPT_ALL));
URLConnection myURLConnection = myURL.openConnection();
myURLConnection.connect();

InputStream is = myURLConnection.getInputStream();
BufferedReader br = new BufferedReader(new InputStreamReader(is));
line = "";
while ((line = br.readLine()) != null) {
    System.out.println(line);
}

```

With the above code, I get the page in English only. I want to load it in German, French and Italian too. How can I do that?