Adding a New Language to Nutch....

If you want to have Nutch in your language - hopefully the below helps. I have been Googling around and digging in some source code...

<input type="hidden" name="lang" value="fa"/>

Change the value of lang to match the language you are adding (e.g. fa)

    <antcall target="generate-locale">
        <param name="doc.locale"  value="fa"/>

Where fa is the language to add.

ant generate-docs

  //see what locale we should use
  Locale ourLocale = null;
  if(!queryLang.equals("")) {
        ourLocale = new Locale(queryLang);
        language = new String(queryLang);
  }else {
        ourLocale = request.getLocale();

Then change the line:

<i18n:bundle baseName=""/>


<i18n:bundle baseName="" locale="<%=ourLocale%>"/>

* Now we are ready to build it:

ant war

* Copy the .war file to your servlet container's webapp directory. If everything went well you will see your language code in the bottom, then you can select it, and the search interface will come back with the localisation you just put in.

AddingNewLocalization (last edited 2009-09-20 23:10:03 by localhost)