You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nutch.apache.org by "David Podunavac (JIRA)" <ji...@apache.org> on 2006/09/01 09:49:23 UTC

[jira] Updated: (NUTCH-358) Language Switching

     [ http://issues.apache.org/jira/browse/NUTCH-358?page=all ]

David Podunavac updated NUTCH-358:
----------------------------------


Okay I found out how to fix this correct me if I am wrong.
In order to see the result page in the user selected language not browser dependent
I added one line (+)  in search.jsp 
right after these lines 

// get the lang from request
  String queryLang = request.getParameter("lang");
  if (queryLang == null) { queryLang = ""; }
  Query query = Query.parse(queryString, queryLang, nutchConf);
  bean.LOG.info("query: " + queryString);
  bean.LOG.info("lang: " + queryLang);

+ java.util.Locale selectedLocale = new java.util.Locale(queryLang,                      queryLang.toUpperCase());

and replaced (-) with (+) following line and it worked for me ;) 

-<i18n:bundle baseName="org.nutch.jsp.search"/>
+<i18n:bundle locale="<%= selectedLocale%>" baseName="org.nutch.jsp.search"/>

HTH cheers david 

> Language Switching
> ------------------
>
>                 Key: NUTCH-358
>                 URL: http://issues.apache.org/jira/browse/NUTCH-358
>             Project: Nutch
>          Issue Type: Bug
>          Components: web gui
>    Affects Versions: 0.8
>         Environment: Linx ubuntu 6.0.6
> jakarta-tomcat-5.0.28
> nutch-0.8
>            Reporter: David Podunavac
>
> Language selection on bottom of page does not affect the result page.
> So if browser language config is set to e.g. "en" result page(search.jsp) will be displayed in EN
> browsers language. NO matter what language has been selected (the locale links of the bottom of page).
> request.getParameter="lang" is useless as far as i can see
> So the links on bottom of the page does not translate the reslutpages keywords.
> This must be a BUG 
> and shall be reported what i did now for that reason.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira