Tweetegy On the edge of chaos with Blockchain, Dapps, DeFi, JavaScript

| About | Search | Archive | Github | RSS |

How to get a semantic list of all spoken languages in the world

First stop, grab and parse the list from here:

Getting language meta data by url dereferencing

This is the easiest method but has less control over the data that is returned (by default all data about the language is returned). Simply replace the [language_name] part of the following url with the value in “Language Name” (NOTE: it is case sensitive so the Language Name must be in capital case):[Language_Name]_language.json

So for Aramaic the url would be:

For Khmer the url would be:

Getting a subset of data

Let’s say we want a little more control and therefore need only a subset of the data available. In this case we can turn to the SPARQL endpoint available at Copy and paste the following example to get name, abstract, depiction, comment and label data for English Language:

PREFIX dbprop: <>
PREFIX dbowl: <>
PREFIX dbpedia: <>
PREFIX rdfs: <>
PREFIX foaf: <>
SELECT ?uri ?name ?label ?thumbnail ?depiction ?abstract ?comment
	?uri dbprop:name "English"@en;
	rdf:type dbpedia-owl:Language;
	dbprop:name ?name;
	foaf:depiction ?depiction;
	dbowl:thumbnail ?thumbnail;
	dbowl:abstract ?abstract;
	rdfs:comment ?comment;
	rdfs:label ?label .
	filter (lang(?label) = "en" )
	filter (lang(?abstract) = "en" )
	filter (lang(?comment) = "en" )

Simply change ?uri dbprop:name "English"@en; to the (English) name of the language that you want to search for e.g. ?uri dbprop:name "French"@en; will return the dbpedia data fields related to the French Language.