We just finished with a big project for latin america that included among
other things internationalized versions of htdig (both english and spanish
at the same time).  I've seen a lot of questions on the mailing list and FAQ
about how to do the build_select_lists, but few examples. Took a while, but
here's a drag and drop example of how to get your search form in spanish (or
any other language without using templates, but passing variables right to
the htsearch).  This is on a slackware box running a slackware-current from
about a month ago. (side note: Great distro, I highly recommend it!)

build_select_lists:  METHOD_LIST method method_names 2 1 2
                        FORMAT_LIST format template_map 3 2 1 template_name
""
                        SELECTED_SORT sort sort_names 2 1 2
method_names:  "and" "Todas" \
                "or" "Cualquiera" \
                "boolean" "Boolean"

template_map:  Largo builtin-long builtin-long Corto builtin-short
builtin-short
template_name: builtin-long

sort_names:  "score" "Relevanc�a" \
                "time" "Hora" \
                "title" "T�tulo" \
                "revscore" "Relevanc�a Ascendieno" \
                "revtime" "Hora Ascendiendo" \
                "revtitle" "T�tulo Ascendiendo"

locale:               es_PR
lang_dir:             ${common_dir}/spanish
bad_word_list:        ${lang_dir}/bad_words
endings_affix_file:   ${lang_dir}/spanish.aff
endings_dictionary:   ${lang_dir}/spanish.0
endings_root2word_db: ${lang_dir}/root2word.db
endings_word2root_db: ${lang_dir}/word2root.db
nothing_found_file:   ${lang_dir}/nomatch.html
search_results_header: ${lang_dir}/header.html
search_results_footer: ${lang_dir}/footer.html

This is my default install so it used htdig.conf.

----- passing config through submit form-------

To get english we passed the "config" form input field the value
"htdig_en.conf"

Works like a charm.  One thing to note: the configuration manual says:

The following line would do it:
<input type=hidden name=config value="cc">

Which I took to mean, add it.

However, the line already exists and if you add it, it gives you a
configuration file not found error.  So maybe the documentation should be
amended to say

Modify the following line replacing value with your custom configuration
file:
<input type=hidden name=config value="">

Anyway, we followed the FAQ for creating the spanish ispell dictionaries
which worked fine.  If anyone would like a detailed explaination of this
process I'll post it.

----
James O'Malley
Altamente.com


_______________________________________________
htdig-general mailing list <[EMAIL PROTECTED]>
To unsubscribe, send a message to <[EMAIL PROTECTED]> with a 
subject of unsubscribe
FAQ: http://htdig.sourceforge.net/FAQ.html

Reply via email to