Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
Bugfix: language of ConfigLanguage_p.html was not changed properly when a different language was choosen here
(no author)a51417d86b49
diff --git a/htroot/ConfigLanguage_p.html b/htroot/ConfigLanguage_p.htmlindex 50673356e..27ac1b529 100644--- a/htroot/ConfigLanguage_p.html+++ b/htroot/ConfigLanguage_p.html@@ -48,7 +48,7 @@<td valign="top" class="TableCellLight"><form action="ConfigLanguage_p.html"><fieldset>- <select size="10" name="lang">+ <select size="10" name="language">#{langlist}#<option value="#[file]#">#[name]#</option>#{/langlist}#diff --git a/htroot/ConfigLanguage_p.java b/htroot/ConfigLanguage_p.javaindex c572f1fa7..ab4c41dba 100644--- a/htroot/ConfigLanguage_p.java+++ b/htroot/ConfigLanguage_p.java@@ -84,12 +84,12 @@ public class ConfigLanguage_p {if (post != null){//change language- if(post.containsKey("use_button") && (String)post.get("lang") != null){- translator.changeLang(env, langPath, (String)post.get("lang"));+ if(post.containsKey("use_button") && (String)post.get("language") != null){+ translator.changeLang(env, langPath, (String)post.get("language"));//delete language file}else if(post.containsKey("delete")){- File langfile= new File(langPath, (String)post.get("lang"));+ File langfile= new File(langPath, (String)post.get("language"));langfile.delete();//load language file from URLdiff --git a/source/de/anomic/http/httpdFileHandler.java b/source/de/anomic/http/httpdFileHandler.javaindex cb319608b..a26ae69b9 100644--- a/source/de/anomic/http/httpdFileHandler.java+++ b/source/de/anomic/http/httpdFileHandler.java@@ -444,8 +444,15 @@ public final class httpdFileHandler extends httpdAbstractHandler implements http// a different language can be desired (by i.e. ConfigBasic.html) than the one stored in the htLocaleSelectionString localeSelection = switchboard.getConfig("htLocaleSelection","default");- if (args != null)+ if (args != null && (args.containsKey("language")))+ {+ // TODO 9.11.06 Bost: a class with information about available languages is needed.+ // the indexOf(".") is just a workaround because there from ConfigLanguage.html commes "de.lng" and+ // from ConfigBasic.html comes just "de" in the "language" parameterlocaleSelection = args.get("language", localeSelection);+ if (localeSelection.indexOf(".") != -1)+ localeSelection = localeSelection.substring(0, localeSelection.indexOf("."));+ }File targetFile = getLocalizedFile(path, localeSelection);String targetExt = conProp.getProperty("EXT","");