[OSM-talk] Localisation and better search in Taginfo

Jochen Topf jochen at remote.org
Mon Nov 22 17:57:40 GMT 2010

I just put the new version of Taginfo (http://taginfo.openstreetmap.de/)

Taginfo now supports multiple languages. Currently only English and German,
but other languages can be added easily. Not all texts are translated yet.
By default Taginfo uses the language selected in your browser. Using the
drop-down-box on the top right you can override this. The language choice
will then be stored in a cookie.

If you want to help translating: The translations are in the git repository
at https://github.com/joto/taginfo/tree/master/web/i18n/ . The format should
be obvious from the existing files. In the medium term this should probably
be done through translatewiki or so, maybe somebody wants to take this on.

In addition I have redone the whole search. Keys and values are now searched
using a prefix search, so "max" will find "maxspeed" but not "betamax". Parts
of a key or value separated by colons, whitespace, or similar are searched
separately. If you search for something like "=residential" (without the
quotes but with the equals sign) all values with "residential" in them are
found regardless of the key. Something like "highway=residential" also works.

The search has an autocompletion function which finds frequently appearing

The Taginfo pages contain an OpenSearch description, you can easily add the
Taginfo search to your browser. In Firefox for instance you can click on the
icon to the left of the search field and choose "Add Taginfo".

The search isn't perfect. There are many difficulties, for instance it should
be fast and not need too many server resources. Thats why there is no
substring search. And the search should be as intuitive and easy to use as
possible. Making the equals sign "magic", interpreting it in a special way
is an experiment. It makes some searches very easy, but sometimes it doesn't
do what you want. We'll see how that works out in practice.

If you are interested in technical details: Taginfo uses a fullext index
created by the FTS3 module included in Sqlite. For the autocompletion a
special table containing common keys and key/value combinations is used.
Its (re-)created on every data import.

Have fun experimenting!

Jochen Topf  jochen at remote.org  http://www.remote.org/jochen/  +49-721-388298

More information about the talk mailing list