src/core/wp_utils.py
changeset 91 3bbf7371378a
parent 80 3851909cb730
child 334 169b7cfd1f58
--- a/src/core/wp_utils.py	Tue Jul 30 23:08:31 2013 +0200
+++ b/src/core/wp_utils.py	Mon Aug 19 12:12:17 2013 +0200
@@ -221,3 +221,10 @@
     
     return revision_id
     
+def get_dbpedia_lang(dbp_uri):
+    
+    for lang, props in settings.WIKIPEDIA_URLS.iteritems():
+        if dbp_uri.startswith(props['dbpedia_base_url']):
+            return lang
+    return None
+