diff --git a/htroot/ConfigLanguage_p.html b/htroot/ConfigLanguage_p.html index 50673356e..27ac1b529 100644 --- a/htroot/ConfigLanguage_p.html +++ b/htroot/ConfigLanguage_p.html @@ -48,7 +48,7 @@
- #{langlist}# #{/langlist}# diff --git a/htroot/ConfigLanguage_p.java b/htroot/ConfigLanguage_p.java index 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 URL diff --git a/source/de/anomic/http/httpdFileHandler.java b/source/de/anomic/http/httpdFileHandler.java index 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 htLocaleSelection String 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" parameter localeSelection = args.get("language", localeSelection); + if (localeSelection.indexOf(".") != -1) + localeSelection = localeSelection.substring(0, localeSelection.indexOf(".")); + } File targetFile = getLocalizedFile(path, localeSelection); String targetExt = conProp.getProperty("EXT","");