Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
change language immediately
lotus25426c6548f9
diff --git a/htroot/ConfigBasic.html b/htroot/ConfigBasic.htmlindex 05b07bdf8..2f69141b7 100644--- a/htroot/ConfigBasic.html+++ b/htroot/ConfigBasic.html@@ -13,6 +13,8 @@</script><!-- redirecting browser if port was changed -->#(reconnect)#::<meta http-equiv="refresh" content="10; url=#(sslSupport)#http::https#(/sslSupport)#://#[host]#:#[port]#/ConfigBasic.html" />#(/reconnect)#+ <!-- redirecting browser if language was changed -->+ #(changedLanguage)#::<meta http-equiv="refresh" content="0; url=ConfigBasic.html" />#(/changedLanguage)#</head><body id="ConfigBasic">#%env/templates/header.template%#@@ -30,11 +32,13 @@<li><img src="/env/grafics/ok.png" height="16" width="16" alt="ok" /> Select a language for the interface:<br /><fieldset>- <input type="radio" name="language" id="lang_de" value="de" #(langDeutsch)#::checked="checked"#(/langDeutsch)# /><label for="lang_de">Deutsch</label> - <input type="radio" name="language" id="lang_fr" value="fr" #(langFrancais)#::checked="checked"#(/langFrancais)# /><label for="lang_de">Français</label> - <input type="radio" name="language" value="default" id="lang_en" #(langEnglish)#::checked="checked"#(/langEnglish)# /><label for="lang_en">English</label>+ <input type="radio" name="language" id="lang_de" value="de" onchange="this.form.submit()" #(langDeutsch)#::checked="checked"#(/langDeutsch)# /><label for="lang_de">Deutsch</label> + <input type="radio" name="language" id="lang_fr" value="fr" onchange="this.form.submit()" #(langFrancais)#::checked="checked"#(/langFrancais)# /><label for="lang_fr">Français</label> + <input type="radio" name="language" value="default" id="lang_en" onchange="this.form.submit()" #(langEnglish)#::checked="checked"#(/langEnglish)# /><label for="lang_en">English</label></fieldset></li>+ <!-- take care that no other items are changed, but also change the former if no js is enabled -->+ <script type="text/javascript"> document.write('</form><form action="ConfigBasic.html" method="get">'); </script>#(setUseCase)#::<li>diff --git a/htroot/ConfigBasic.java b/htroot/ConfigBasic.javaindex c2b118c43..87e85bd42 100644--- a/htroot/ConfigBasic.java+++ b/htroot/ConfigBasic.java@@ -84,7 +84,8 @@ public class ConfigBasic {// language settingsif ((post != null) && (!(post.get("language", "default").equals(lang)))) {- translator.changeLang(env, langPath, post.get("language", "default") + ".lng");+ if (translator.changeLang(env, langPath, post.get("language", "default") + ".lng"))+ prop.put("changedLanguage", "1");}// peer name settings@@ -92,7 +93,7 @@ public class ConfigBasic {// port settingslong port = env.getConfigLong("port", 8080); //this allows a low port, but it will only get one, if the user edits the config himself.- if (post != null && Integer.parseInt(post.get("port")) > 1023) {+ if (post != null && post.containsKey("port") && Integer.parseInt(post.get("port")) > 1023) {port = post.getLong("port", 8080);}