https://bugzilla.wikimedia.org/show_bug.cgi?id=44038

       Web browser: ---
            Bug ID: 44038
           Summary: Search local titles with another language
           Product: MediaWiki extensions
           Version: unspecified
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: Unprioritized
         Component: Lucene Search
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    Classification: Unclassified
   Mobile Platform: ---

The search box suggests titles as you type. If there were a language selector
next to it, you could search through the list of articles in that language.
Aha, but you say, what's the point of that? If I wanted to read about "Green
Eggs and Ham" in Italian ("Prosciutto e uova verdi"), I would go to the Italian
Wikipedia and read it there. Well, that's not what I'm proposing; what I mean
is, if you selected Italian and searched for "Prosciutto e uova verdi", you
would get taken to the English article, "Green Eggs and Ham".

When you type in the search box, it sends an Ajax request off to what I imagine
must be an API somewhere for the Wikipedia database which responds with a list
of matching article titles. I don't know what the syntax is for that request,
so here's some pseudocode for the purposes of illustration:

API?action=titlesearch;query=

Suppose we select Italian and start searching for "prosciutto e". The API call
is:

API?action=titlesearch;lang=it;query=prosciutto e

We get one result back, "Prosciutto e uova verdi". As we're operating with
Italian selected, clicking it sends the API request:

API?action=showarticle;titlelang=it;title=Prosciutto e uova verdi

That returns "Green Eggs and Ham" and sends the user there.

Of course, this requires a complete table of interlanguage mappings. If I
understand it right, that's something that will eventually be provided by
Wikidata.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to