Menu

#11 Making htdig language sensitive

open
nobody
stable (4)
5
2003-03-24
2003-03-24
No

Hello people,

I had feature request #707489 in search for language-
dependent support. This is useful for sites that use
content negotiation using the Accept-Language HTTP
header.

I embellished htdig to process a setting accept_language
in the config file, by sending it along with the query. The
patch is attached to the feature request.

In addition, I made a wrapper around htsearch to make it
look for different languages; this could be done more
elegantly, but I do not want to change so much to ht://Dig.
Simplicity rules, especially for new features!

If you want to see it in action, try the search engine on
openfortress.nl; it recognises Dutch and English, and the
pages that are already translated are discriminated. Try
the terms "notaris", "notary" and "lawyer" for example, while
shuffling your browser's language settings and reloading.

This now works well. Let me know if you like it.

Cheers,

Rick van Rein,
OpenFortress.

Discussion


Log in to post a comment.