[ 
http://issues.apache.org/jira/browse/NUTCH-164?page=comments#action_12361782 ] 

KuroSaka TeruHiko commented on NUTCH-164:
-----------------------------------------

Actually, the current language selection scheme needs an overhaul.

The locale for the message bundle is determined only by the preferred language 
setting of the browser, while the selection of the localized JSP is done by 
clicking on the language code link in the bottom of each page.  There is no 
coordination.  The choosen language by the language code does not persist in 
the session.

See the discussion about the locale selection at W3C:
http://www.w3.org/International/questions/qa-accept-lang-locales#answer



> Locale (language) choice by first session has global effect to all sessions
> ---------------------------------------------------------------------------
>
>          Key: NUTCH-164
>          URL: http://issues.apache.org/jira/browse/NUTCH-164
>      Project: Nutch
>         Type: Bug
>   Components: web gui
>     Versions: 0.7.1
>  Environment: any
>     Reporter: KuroSaka TeruHiko

>
> Here's a report posted on nutch-users ML by Sergio [EMAIL PROTECTED] on 
> 1/02/2006:
> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
> I just installed nutch in a Fedora Core 3 server.
> Once installed, I crawled a small site to test it. I opened my navigator
> (mozilla 1.7 which reports by default ES-ES locales, and everything was ok).
> Then I asked a friend of mine  (the owner of the server) to test it. He did
> a search with an EN-US locale navigator, and the search page appeared in
> Spanish.
> After a few hours, I did the following: I restarted tomcat, I changed the
> locale of my mozilla to EN, and I opened the search page. Now I always get
> English search page even if I open with a mozilla ES-ES locale.
> I wrote a message to my friend:
> "nutch keeps the locale of the first navigator that makes a request for all
> other requests. By this reason, yesterday as the first request was from my
> ES locale browser, you saw the page in Spanish with your browser that
> reports EN locale. There is a way to make this work:
> * Making sure that, after the server is restarted, the first request is done
> by a browser that reports EN locale."
> <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
> This happened in my environment too.  After taking a look the code, I believe 
> this is caused by
> use of the default message bundle in search.jsp.  The code snipplet looks 
> like:
>     <i18n:bundle baseName="org.nutch.jsp.search"/>
>     ...
>     <title>Nutch: <i18n:message key="title"/></title>
>     ...
> The default message bundle probably has the application scope.  Because of 
> that, the first
> setting of the language has global effect to every session created afterward.
> The right fix is to limit the scope to the session by inserting the scope 
> specifier, as in:
> <i18n:bundle scope="session" baseName="org.nutch.jsp.search"/>
> Other JSP files need to be inspected for the same issue and should be fixed 
> as well.

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

Reply via email to