Hi!

I'm trying to build localization into a DBpedia application, but I've got a
problem. I'm trying to use multilingual results from DBpedia in the follow
way:

   - If available, show results in (for example) German.
   - If not available, show results in the next available language (which
   usually is English).

SPARQL example:

SELECT ?text WHERE {
  <http://dbpedia.org/resource/Berlin> dbpprop:abstract ?text. OPTIONAL {
FILTER langMatches( lang(?text), "de" ) }
}

The problem is that the query never chooses an available language when the
preferred language is not available.
For example, no results are returned if the following code is used: FILTER
langMatches( lang(?text), "he" )
The same happens for other languages as well.

Does anyone know of a solution to this?

Thank you,
Stephen Hatton
------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Dbpedia-discussion mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dbpedia-discussion

Reply via email to