Bugfix: language of ConfigLanguage_p.html was not changed properly when a different language was choosen here

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@2948 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
(no author) 19 years ago
parent 4147c9f490
commit a51417d86b

@ -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}#

@ -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

@ -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","");

Loading…
Cancel
Save